Closed drvdputt closed 1 year ago
There is already instrument.instruments
:
In [4]: ins.instruments()
Out[4]:
['jwst.nirspec.prism',
'jwst.nirspec.g140.medium',
'jwst.nirspec.g140.high',
'jwst.nirspec.g235.medium',
'jwst.nirspec.g235.high',
'jwst.nirspec.g395.medium',
'jwst.nirspec.g395.high',
'jwst.miri.mrs.ch1.A',
'jwst.miri.mrs.ch1.B',
'jwst.miri.mrs.ch1.C',
'jwst.miri.mrs.ch2.A',
'jwst.miri.mrs.ch2.B',
'jwst.miri.mrs.ch2.C',
'jwst.miri.mrs.ch3.A',
'jwst.miri.mrs.ch3.B',
'jwst.miri.mrs.ch3.C',
'jwst.miri.mrs.ch4.A',
'jwst.miri.mrs.ch4.B',
'jwst.miri.mrs.ch4.C',
'iso.sws.speed0.1a',
'iso.sws.speed0.1b',
'iso.sws.speed0.1d',
'iso.sws.speed0.1e',
'iso.sws.speed0.2a',
'iso.sws.speed0.2b',
'iso.sws.speed0.2c',
'iso.sws.speed0.3a',
'iso.sws.speed0.3c',
'iso.sws.speed0.3d',
'iso.sws.speed0.3e',
'iso.sws.speed0.4',
'iso.sws.speed1.1a',
'iso.sws.speed1.1b',
'iso.sws.speed1.1d',
'iso.sws.speed1.1e',
'iso.sws.speed1.2a',
'iso.sws.speed1.2b',
'iso.sws.speed1.2c',
'iso.sws.speed1.3a',
'iso.sws.speed1.3c',
'iso.sws.speed1.3d',
'iso.sws.speed1.3e',
'iso.sws.speed1.4',
'iso.sws.speed2.1a',
'iso.sws.speed2.1b',
'iso.sws.speed2.1d',
'iso.sws.speed2.1e',
'iso.sws.speed2.2a',
'iso.sws.speed2.2b',
'iso.sws.speed2.2c',
'iso.sws.speed2.3a',
'iso.sws.speed2.3c',
'iso.sws.speed2.3d',
'iso.sws.speed2.3e',
'iso.sws.speed2.4',
'iso.sws.speed3.1a',
'iso.sws.speed3.1b',
'iso.sws.speed3.1d',
'iso.sws.speed3.1e',
'iso.sws.speed3.2a',
'iso.sws.speed3.2b',
'iso.sws.speed3.2c',
'iso.sws.speed3.3a',
'iso.sws.speed3.3c',
'iso.sws.speed3.3d',
'iso.sws.speed3.3e',
'iso.sws.speed3.4',
'iso.sws.speed4.1a',
'iso.sws.speed4.1b',
'iso.sws.speed4.1d',
'iso.sws.speed4.1e',
'iso.sws.speed4.2a',
'iso.sws.speed4.2b',
'iso.sws.speed4.2c',
'iso.sws.speed4.3a',
'iso.sws.speed4.3c',
'iso.sws.speed4.3d',
'iso.sws.speed4.3e',
'iso.sws.speed4.4',
'spitzer.irs.sl.1',
'spitzer.irs.sl.2',
'spitzer.irs.sl.3',
'spitzer.irs.ll.1',
'spitzer.irs.ll.2',
'spitzer.irs.ll.3',
'spitzer.irs.sh',
'spitzer.irs.lh']
So we should just document this better.
Paraphrased feedback from @BethanyRS: while trying out the new API on the various example spectra provided, it is not always clear what options are available to configure the instrument pack, and how the syntax works. The main reason for this is that a user currently needs to look into the instrument pack YAML files to see the available models, and consider the tree structure to figure out how their wildcard will work.
Of course, the main solution for this is proper documentation. In addition to documentation, my suggestion is to have a function that writes out all available instruments, or even have this information printed out when
help(instrument)
is called.A minimal solution would be to put a function like this in instrument
This can then be called explicitly by a user prints out a flattened list of instrument configurations, and it should be obvious how the wildcards will work.