-
Notifications
You must be signed in to change notification settings - Fork 0
Create telluric system groups #2050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…tions. Initial logic for f2 tellurics
fpu: Flamingos2Fpu | ||
) extends CalibrationConfigSubset derives Eq: | ||
|
||
def modeTypeTag: String = "flamingos_2_long_slit" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These seem to be 1:1 with the lucuma.core.enums.ObservingModeType
. Perhaps we could use that here?
obs_rec.c_observing_mode_type::text || '/' || 'telluric' || '/' || obs_rec.c_observation_id, | ||
NULL, | ||
NULL, | ||
false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order will matter for tellurics won't it? Maybe the properties are edited when you add the calibrations though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
-- Only system groups can have calibration roles | ||
ALTER TABLE t_group | ||
ADD CONSTRAINT group_calibration_roles_system_only_check | ||
CHECK (c_system = true OR c_calibration_roles = '{}'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the idea that the UI will hide the groups with calibration roles associated with single observations? Do we care which calibrations go in there or just whether they are per-observation vs. per-unique config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put this just for completness seemed odd to have the current calibrations group without roles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very familiar with calibrations (or groups for that matter) but the code looks good. I didn't realize we already had system groups. It makes sense to me to keep using those. 👍
Turns out that the calibration system is more complicated than originally designed. There are several families of calibrations. The one we have implemented now is called per program per configuration and includes twilights and spectrophotometric.
The next one is for tellurics and we will call it per science observation. In this PR we do a large refactoring splitting
CalibrationService
services into two while the original one remains as a coordinator.We also implement the first step where all flamingos 2 longslit observations will be in its own system group. The creation and dissolution of these groups is automatically handled by the system.
Now system groups can have a list of calibration roles as well.