mzechmeister / serval

calculate radial velocities from stellar spectra
MIT License
36 stars 9 forks source link

NaD for HARPS and other inst #29

Closed mzechmeister closed 4 years ago

mzechmeister commented 4 years ago

Currently, NaD is calculated only for CARM_VIS.

https://github.com/mzechmeister/serval/blob/2042a70378c15215be4faab6ac3c48f757f4185b/src/serval.py#L345-L354

Adapting this for HARPS is easy. But one can think about a restructuring such that the order selection for the instrument is not hard-coded in serval.py and moved to the 'inst_*.py' files or made generally more generic .

3fon3fonov commented 4 years ago

For HARPN:

serval.py: error: argument -looki: invalid choice: 'NaD' (choose from 'Halpha', 'Haleft', 'Haright', 'CaI', 'HK')

Please include this in the new SERVAL. If you remember we did it on the old version for HARPS, but it was not as easy as you wrote above. It would be nice to have NaD activity time series from HARPS and HARPN

BTW, for HARPS it should be:

   if inst == 'HARPS':
      if typ in ['Halpha', 'Haleft', 'Harigh', 'CaI']: o = 67
      if typ in ['CaK']: o = 5
      if typ in ['CaH']: o = 7
      if 'NaD' in typ: o = 56

Perhaps the same for HARPN, but this is currently not available.

mzechmeister commented 4 years ago

The code was restructured and line indices should be calculated automatically for all instruments.