astropy / specutils

An Astropy coordinated package for astronomical spectroscopy. Maintainers: @rosteen @keflavich @eteq
http://specutils.readthedocs.io/en/latest/
168 stars 127 forks source link

Remove ASDF extension requirement for JWST x1d loader #1062

Open rosteen opened 1 year ago

rosteen commented 1 year ago

I recently encountered a use case where a science team was creating their own data products and attempting to match the JWST file format, so that the files could automatically be identified and read in by the specutils IO machinery. The last sticking point was that the _identify_jwst_fits function requires that there be an ASDF extension in the file as well as having TELESCOP=="JWST" in the header. As far as I can tell, only 2D and 3D files actually use the ASDF extension, so I'm thinking that removing that requirement for identifying x1d files might be useful to make it easier for users to create JWST-style files and have them identified. I'm opening this issue in case there are any objections (I'm not convinced yet that this is a good idea myself) - to me, a potential downside is the case where a user creates a file with TELESCOPE=JWST in the header but in a different format that otherwise could be read by one of the generic readers.

aragilar commented 1 year ago

It's unclear to me what the suggestion is. Is it that non-JWST files get loaded with the (1d) JWST loader if they have TELESCOP=="JWST" (which seems fine to me, though your description seems to be of an XY problem), or something more general?