gemini-hlsw / gem

prototype postgres back-end for ocs
Other
15 stars 5 forks source link

Store wavelength with consistent units #263

Open jdnavarro opened 6 years ago

jdnavarro commented 6 years ago

In code we use angstroms as it's the smallest supported wavelength unit, but in the database important to use units that astronomers are familiar with, for SQL queries and such.

The wavelength units need to be consistent across instruments. GNIRS uses um while GMOS uses nm, but we need to confirm this general rule with the astronomers.

GNIRS may have some units stored in other units that are not um.

The current GCAL wavelengths (GNIRS and GMOS) are in angstroms, we should change that to whatever is consistent with the instrument.

swalker2m commented 6 years ago

The issue here is that the smart_gmos_north, smart_gmos_south, and now smart_gnirs tables store wavelengths in angstroms. We believe that the staff will expect to see these wavelengths in nm (for GMOS) and um (for GNIRS) so we should update the tables to use numeric for the wavelength columns.

tpolecat commented 6 years ago

We can create a scaling lens like we did with angles, and then make Metas to do the translation in the db code.