[AstroPy] specutils loading FITS file

Peter Teuben teuben at astro.umd.edu
Fri Jun 28 10:21:46 EDT 2019


Hi James,

     I recall that Nick and I worked a bit on extracting spectra from a 
fits cube one or two years ago.  This may still be un-merged code in my 
forked repo.

When you say 'high-resolution spectrum FITS file' what do you mean with 
this. A 1D spectrum? Even a 1D spectrum can be stored with naxis1,2,3 = 
1,1,NAXIS3 where the WCS of axis1 and 2 are used to label the 
coordinates.   That format is really still a 3D cube and should work in 
my version.

- peter

On 6/28/19 9:52 AM, Nicholas Earl wrote:
> Hey James,
>
> Specutils dev here. Specutils does not have a FITS loader for every 
> data file (though we do have an extensive collection). I'd suggest 
> following the documentation 
> <https://specutils.readthedocs.io/en/latest/custom_loading.html#creating-a-custom-loader> on 
> creating a custom data loader for your FITS file. Likewise, if you 
> feel so inclined, you can submit a PR to the repository with the 
> loader you create so that others trying to load similar data files 
> won't have to create their own loaders.
>
> If you're still unable to load the data file after having written your 
> data loader (or need help writing the data loader), please open an 
> issue on specutils github repo 
> <https://github.com/astropy/specutils/issues>. We're eager to make 
> specutils as usable as possible, so please let us know if you run into 
> trouble.
>
> Cheers,
> Nick
>
> On Thu, Jun 27, 2019, at 5:59 PM, James Dull wrote:
>>
>> I am currently trying to open a processed, high-resolution spectrum 
>> FITS file. I have tried many of the methods suggested online and yet 
>> cannot get the file to open without error. I can get get files to 
>> open from other sources. Depending on the version of the file used I 
>> get the following errors.
>>
>>
>> InvalidSubimageSpecificationError: Cannot find a spectral axis in the 
>> provided WCS. Are your 'ctype's correct?
>>
>>
>> Or
>>
>>
>> IORegistryError: Format could not be identified.
>>
>>
>> The FITS file was generated using The SkyX Pro. I have also tried to 
>> open the reduced FITS file created by the program ISIS.
>>
>>
>> Any help would be greatly appreciated.
>>
>>
>> Tucannon
>>
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy at python.org
>> https://mail.python.org/mailman/listinfo/astropy
>>
>
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20190628/f573c50b/attachment.html>


More information about the AstroPy mailing list