Aligning and stacking spectra

Affiliation
American Association of Variable Star Observers (AAVSO)
Sat, 05/03/2014 - 13:58

Please can anyone advise if software is available to align and average sets of 16 bit spectral data in Fits files? I've considered turning down the camera gain to reduce the signal dynamic range to ten bits and then using the remaining 6 to allow stacking and manage skyglow, but this would reduce the range of objects that could be examined.

I've tried Isis and Iris but neither of them were able to display my Fits files and they stacked rather than averaged the data. RSpec did average the data but it worked by converting 16 bit Fits files to video in 8 bit format and I'm not sure if it aligns the spectra. Excel is powerful and straightforward but tedious. So I'm thinking of writing a routine in Python, but don't want to spend the time if there is software already available that will do the job.

Any thoughts/advice on this would be much appreciated.

Thanks Peter

 

 

Affiliation
American Association of Variable Star Observers (AAVSO)
Aligning and stacking spectra

Peter,

I'm not entirely certain I understand exactly what you're wanting, so my answer may not meet your needs. I use Meade's Image Processor program. It wasn't the easiest to figure out, but once I did it became extremely useful.  I load my raw spectrum fts files using the group menu options.  As IP completes each process, it saves a modified copy of the original, so if you perform an alignment, you have both the original files and the individual aligned files.  The averaging, however, still happens when combininhg the aligned files into a single image.  As an aside, I have found selecting median rather than average for combining purposes tends to give me a much better final result, especially if my original images contain artificats not removed by dark subtraction. 

The biggest drawback using IP is that the fts files it creates during it's various processes cannot be read by RSpec.  I typically need to export the desired spectra to bmp format before analyzing with RSpec.

IP is freely downloadable from Meade's website.

Jim

Affiliation
American Association of Variable Star Observers (AAVSO)
Aligning and stacking spectra

Jim,

I'm using an Alpy600 spectrometer with a slit and wanted to find software that allowed sets of spectral data to be preprocessed, aligned, combined and calibrated without reaching the limit of the process dynamic range. I then wanted to analyse the spectral data using techniques such as cross correlation to look for slight changes in spectra from a single star. Hence the need for 16 bit data and averaging rather than stacking.

I've just found that with the RSpec 32 bit processing option, although the pixel map says that the video data maximum is 255, pausing and saving a single averaged frame to user.dat produces floating point values much higher. I'll carry out some more checks but if the user.dat file is providing 16 or 32 bit precision data then part of the problem is solved. The question then will be whether alignment is a significant issue with spectral data taken from a slit spectrometer and whether RSpec aligns rhe spectra prior to averaging.

Many thanks for your advice, Peter

Affiliation
Variable Stars South (VSS)
Stacking spectra

 

[quote=PeterOsman]

Jim,

I'm using an Alpy600 spectrometer with a slit and wanted to find software that allowed sets of spectral data to be preprocessed, aligned, combined and calibrated without reaching the limit of the process dynamic range. I then wanted to analyse the spectral data using techniques such as cross correlation to look for slight changes in spectra from a single star. Hence the need for 16 bit data and averaging rather than stacking.

I've just found that with the RSpec 32 bit processing option, although the pixel map says that the video data maximum is 255, pausing and saving a single averaged frame to user.dat produces floating point values much higher. I'll carry out some more checks but if the user.dat file is providing 16 or 32 bit precision data then part of the problem is solved. The question then will be whether alignment is a significant issue with spectral data taken from a slit spectrometer and whether RSpec aligns rhe spectra prior to averaging.

Many thanks for your advice, Peter

[/quote]

Peter

You can use Isis to perform what you want to do.

When it adds images together it doesn't clip them if it reaches saturation providing your original subs are not saturated.

You should not need to align your images when using a slit spectrograph unless your camera is flexing on the ALPHY. This should not occur. If your guiding is a bit off and the star wanders off the slit then you just lose throughput. It doesn't change where the spectral data falls on the ccd. I regularly use lots of subs stacked with Isis and am able to accurately measure absolute flux of emission lines. An example is with V1369 Cen that has a very bright Ha emission line. I can only use 10 sec exposures before the Ha component will reach the non linear part of the ccd. I then stack 25 exposures to improve the S/N in the blue part of the spectra. This still gives accurate measures of the Ha flux.

If you really want to align the spectra there is a check box in Isis to do this but I have never used it.

Cheers

Terry

Affiliation
American Association of Variable Star Observers (AAVSO)
Stacking spectra

Terry,

Many thanks for confirming that the alignment step shouldn't be necessary. My camera (Atik314L+) to Alpy 600 has no discernible flex and the polar alignment and guiding is more than adequate for the short exposures needed.

Its good to hear that the Isis software accomodates the dynamic range Unfortunately I'm having no success displaying my Fit images using either Isis or Iris. Undoubtedly a simple oversight or misunderstanding on my part but so far it has me stumped! Do you know of a user manual that might cover this?

All the best, Peter 

Affiliation
American Association of Variable Star Observers (AAVSO)
While ISIS seems to be a nice

While ISIS seems to be a nice program, most probably it shares the problem(s) with Iris - it supports 16 bit SIGNED FITS files. So maximum pixel value is ca 32 KADU.

If you should be familiar with Linux/MacOSX and dare to try IRAF, your task will be pretty simple. Ulisse Munari has also a nice step by step introduction as well: http://ulisse.oapd.inaf.it/Astro/AsMon/index.html

Plain extraction of the spectrum in IRAF is the matter of 2 commands, nice graphical plots and mostly tryping "ENTER" :-)

Affiliation
British Astronomical Association, Variable Star Section (BAA-VSS)
ISIS fits file format

[quote=Tonisee]

While ISIS seems to be a nice program, most probably it shares the problem(s) with Iris - it supports 16 bit SIGNED FITS files. So maximum pixel value is ca 32 KADU.

[/quote]

This is not a limitation in ISIS which can handle all 16 and 32 bit image formats (integer and real)

Robin

Affiliation
Variable Stars South (VSS)
Stacking spectra

What capture software are you using?

. I use the same camera and have no problem visualising my images with Isis or Iris. I use CCDSoft for image capture.

Terry

Affiliation
British Astronomical Association, Variable Star Section (BAA-VSS)
ISIS

Hi Peter,

I use ISIS with an ATIK 314L+ and ALPY 600  and it can certainly display  and reduce spectra from raw images to final spectrum including combining (and aligning in both Y and X if required) a set of spectra, though it is very particular about the program options being set up correctly and the files having  the correct file name format.  Have you seen these tutorials?

 http://www.astrosurf.com/buil/isis/guide_alpy/tuto_en.htm

(specific to the ALPY)

 http://www.astrosurf.com/buil/isis/guide_lisa/tuto_en.htm

(goes into  a bit more depth in some areas)

 

Cheers

Robin

Affiliation
British Astronomical Association, Variable Star Section (BAA-VSS)
ISIS

[quote=Robin Leadbeater]

 Have you seen these tutorials?

 http://www.astrosurf.com/buil/isis/guide_alpy/tuto_en.htm

(specific to the ALPY)

 http://www.astrosurf.com/buil/isis/guide_lisa/tuto_en.htm

(goes into  a bit more depth in some areas)

[/quote]

 

Also this tutorial, although based on LHIRES spectra is useful as it goes into more detail about how to setup the program.

 http://www.astrosurf.com/buil/isis/guide_lhires/tuto1_en.htm

Once setup ISIS can be used to automate the whole reduction process.  A good place for further ISIS support is the ARAS forum

  http://www.spectro-aras.com/forum/

Cheers

Robin

Affiliation
American Association of Variable Star Observers (AAVSO)
Hi Robin,

It was as you

Hi Robin,

It was as you said, the file naming conventions took a bit of getting used to and it was also helpful to first explore every page to better understand the software approach, and to find out where the various parameters had to be entered. The references you supplied were most helpful as was the advice from Francois Cochard.

I can now enter and process my images and look forward to exploring the software capability. It looks to be comprehensive and should help significantly if I'm to ever submit spectra to AAVSO. As a first step I'm keen to see how accurately I've identified the lines in the Argon Neon Hydrogen lamp of the Alpy calibration module. There were so many lines I initially found it impossible to identify them from the database reference spectra and had to first compare them against the Balmer lines from Sirius using RSpec. I'm not sure how accurate or acceptable it is to use a star as a calibration source, though it was just a first approximation!

All the best, Peter

Affiliation
British Astronomical Association, Variable Star Section (BAA-VSS)
ALPY calibration lamp lines

[quote=PeterOsman]

 As a first step I'm keen to see how accurately I've identified the lines in the Argon Neon Hydrogen lamp of the Alpy calibration module. There were so many lines I initially found it impossible to identify them from the database reference spectra and had to first compare them against the Balmer lines from Sirius using RSpec. I'm not sure how accurate or acceptable it is to use a star as a calibration source, though it was just a first approximation!

[/quote]

Once you get fully up to speed with ISIS and ALPY, you will find a feature where you can just click on  the position of one easily identifiable line in the lamp spectrum and ISIS cleverly knows where to look for all the others based on the fact that you are using an ALPY and the entered pixel size.  At this level, fully calibrating spectra from raw images to final result can be done with just a few clicks.

If you want to have a go at identifying them yourself then Richard Walkers atlas of lines for a similar type of lamp is useful,

 http://www.ursusmajor.ch/downloads/sques-relco-sc480-calibration-lines-…

Cheers

Robin

Affiliation
British Astronomical Association, Variable Star Section (BAA-VSS)
displaying fits images in ISIS

Peter, 

Can you confirm if you can display raw atik 314L+ images in ISIS using these steps:-

select image tab

click the file explorer icon

select the raw ATK314L+ fits file to be displayed

If this does not display an image it sounds like there is something wrong with your installation

 

Cheers

Robin

Affiliation
American Association of Variable Star Observers (AAVSO)
I use the ATik314L on the

I use the ATik314L on the Spectra-L200.

Image aquisition, stacking, darks etc, using AstroArtV5.

John P's latest version of "BASS Project" will handle and process all the available formats of spectral images, sky removal, calibration (and much more). Can save the profiles in 1D fits format (similar to the BeSS requirements) for ProAm submissions.

//uk.groups.yahoo.com/neo/groups/astrobodger/info

 

 

 

 

 

Affiliation
American Association of Variable Star Observers (AAVSO)
Aligning and stacking spectra

Hi Ken,

I've registered for the Bass Project group and look forward to seeing the software capability. Thanks also for your reference to the BeSS requirements for ProAm spectra submissions. It led me to a really interesting AAVSO discussion page on the subject 'How to archive 'spectra'

Many thanks Peter

Affiliation
American Association of Variable Star Observers (AAVSO)
Aligning and stacking spectra

Thank you everyone for all the useful and detailed comments. Robin, I'm working my way through those links you gave me, which are most helpful and can now display a spectrum. I couldn't find an Explore File Icon but have only just started working my way through the tutorial and now know the FIT file is acceptable.

Not quite out of the woods yet as when I load up the Image I can see a spectrum but the graticule only shows one line and when I press the 'Next' button I get the error message  'Image not found in the working directory'. 

With all your suggestions I'm sure I'll get to the bottom of the issue and Francois Cochard of Shelyak has also made some suggestions that look promising. I'll let you know how I go over the next day or two

Many thanks, Peter

 

Affiliation
British Astronomical Association, Variable Star Section (BAA-VSS)
ALPY calibration using a star and more

Hi Peter,

Yes using the Balmer lines in a star is a good method of wavelength calibration for low resolution spectra like those  produced by ALPY. There is a description of the various possible techniques for wavelength calibration of ALPY using either a calibration star, the calibration lamp or a combination of the two here

 http://www.astrosurf.com/buil/isis/guide_alpy/resume_calibration.htm

The big advantage of the high stability of ALPY is that unless you are looking for exceptionally high accuracy, this is pretty much a one off operation  with subsequent calibrations needing at most just one line (either in the lamp spectrum or a Balmer line in the reference star.) 

The problem with the forward/back buttons in ISIS is a common one and is almost certainly because your file naming is not quite right (In particular make sure the file location is setup in "settings" and the separator between file name and number as set  in  "general" " file name prefix and suffix" agrees with what you are actually using and the files are numbered squentially from 1 up with no leading zeros)

While waiting for the AAVSO database, there are many campaigns already running on the ARAS website which are accepting spectra. 

 http://www.astrosurf.com/aras/

 

Cheers

Robin