British Astronomical Association
Supporting amateur astronomers since 1890

Secondary menu

Main menu

Home Forums Spectroscopy
Terms of use

Spectra database and IRAF "multispec" format

8 posts / 0 new
Last post
andrew.j.smith1905's picture
Online
Last seen: 2 min 23 sec ago
Joined: 02/12/2016 - 12:22
Spectra database and IRAF "multispec" format

Before I embark on a homemade solution can I ask if the BAA spectra database can import echelle spectra in the IRAF FITS "multispec" format? I suspect not in which case does anyone have a solution to convert it to a set of single spectra that it can import? It can within or outside IRAF.

I know it is a long shot but worth asking. If not it is heads down in astropy to see what I can come up with. 

Building the echelle was a lot simpler that reducing the spectra!

Regards Andrew

I attach an example spectra. Note it is not compliant with BSS and is just a test from the IRAF documentation.

Attachments: 
AttachmentSize
Binary Data Bdemoobj1.ec_.fits14.06 KB
Andy Wilson's picture
Offline
Last seen: 2 days 8 hours ago
Joined: 29/03/2014 - 16:05
Spectra database and IRAF "multispec" format

Hi Andrew,

You are correct in your assumption that the BAA Spectroscopy Database does not support IRAF multispec format at this time. However, it is possible to build in support. The big question is how long it would take me to build, noting I already have some outstanding development work for the VSS Database.

It may take until the second half of May or June to take a proper look at the file format. Then I can assess whether a 'quick' change is possible.

Note of course that the other header fields would need to be BeSS compliant. If this is going to be a problem then it won't be worth going down the route of building IRAF multispec compatibility.

Best wishes,

Andy, BAA Spectroscopy Database Manager

andrew.j.smith1905's picture
Online
Last seen: 2 min 23 sec ago
Joined: 02/12/2016 - 12:22
Effort

Andy leave it with me. I would benefit from fixing it myself so I can use other tools.

Regards Andrew

Andy Wilson's picture
Offline
Last seen: 2 days 8 hours ago
Joined: 29/03/2014 - 16:05
See how it goes

Give me a shout if you get stuck. It would be nice to have a single fits file format for the multiple orders in Echelle spectra, but I suspect agreeing that amongst the community would be no small task.

Andy

Robin Leadbeater's picture
Offline
Last seen: 2 hours 11 min ago
Joined: 05/03/2014 - 00:50
multispec conversion

Hi Andrew, Andy

I come across this format from time to time and it would be nice to be able to convert multispec format spectra to single orders. Storing them in the database in multispec would probably not be a good idea unless they can be output as separate orders as none of the usual amateur fits reading programs can handle them as far as I know.

I have used a very long winded approach involving dismantling the multispec files and importing them into Excel but Otmar Stahl, the professional on the German VdS spectroscopy forum, kindly converted some to separate orders for me a few years back using an IRAF script I believe. You could ask on there or if you get no joy I can try contacting him and see if he would share the script.

Cheers

Robin

andrew.j.smith1905's picture
Online
Last seen: 2 min 23 sec ago
Joined: 02/12/2016 - 12:22
multispec conversion

Thanks Robin I have asked there and Otmar has responded. He proposed an IRAF method I had already tried but it seems ISIS did not like the 1D result. It could have been a specific issue with the data I had.

In any even I have cracked the key issues in getting a Python program to read the data so I can write it out in an acceptable FITS format. Just need to complete the program and test it out. 

Thanks for the advice.

Regards Andrew

Andy Wilson's picture
Offline
Last seen: 2 days 8 hours ago
Joined: 29/03/2014 - 16:05
multispec conversion

Robin,

That is a good point about ensuring that amateur software should be able to read the files.

Andrew,

Glad to hear you are making progress. Python with astropy are fantastic for programming with fits files. So far I've only been using them on a Mac, but I must get around to trying them out on Windows.

Cheers,

Andy

andrew.j.smith1905's picture
Online
Last seen: 2 min 23 sec ago
Joined: 02/12/2016 - 12:22
Making Progress....

Yes Andy I am making progress. I am using astropy on Windows in a very amateur manner.

Nonetheless,I have managed to extract the first of the test spectra from the multispec format and saved it in a form that ISIS will open and display correctly. It helped when I opened the .FITS file in 'update' mode then I could add the extra header data. Just need to put it in a loop to get all the orders out and tidy up the header data. (Tim Lester's PlotSpectra currently objects to the date and time format!) I will need to read the BSS spec carefully.

Regards Andrew