Skip to content

Commit

Permalink
add can_offset to the datamodel
Browse files Browse the repository at this point in the history
  • Loading branch information
imedan committed Apr 4, 2024
1 parent cd7056a commit 4f91c67
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 34 deletions.
69 changes: 35 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,40 +25,41 @@ This package deals with all the aspects of loading and processing targets of opp

Target of opportunity files must be CSV or [Parquet](https://parquet.apache.org) files with a table/dataframe that conforms to the following structure:

| Column | Type | Description |
|---------------------|---------|----------------------------------------------------------------------------------------------------------|
| too_id | int64 | Unique identifier for the ToO target. [required] |
| fiber_type | string | Type of fiber to be used to observe the target. [required. |
| catalogid | int64 | catalogid for this target. |
| sdss_id | int64 | sdss_id for this target. |
| gaia_dr3_source_id | int64 | Unique identifier of the target in the Gaia DR3 catalog (`source_id` column). |
| twomass_pts_key | int32 | Unique identifier of the target in the 2MASS catalog (`pts_key` column). |
| sky_brightness_mode | string | The sky brightness mode. Either `bright` or `dark`. |
| ra | float64 | The Right Ascension of the target in ICRS coordinates as decimal degrees. [required] |
| dec | float64 | The declination of the target in ICRS coordinates as decimal degrees. [required] |
| pmra | float32 | The proper motion in RA in mas/yr as a true angle (the cos(dec) factor must have been applied). |
| pmdec | float32 | The proper motion in Dec in mas/yr as a true angle. |
| epoch | float32 | The epoch of the ra/dec coordinates. Required but only relevant if pmra/pmdec are defined. |
| parallax | float32 | The parallax in arcsec. |
| lambda_eff | float32 | The effective wavelength to calculate the atmospheric refraction correction for the target. |
| u_mag | float32 | Sloan u' magnitude of the target. |
| g_mag | float32 | Sloan g' magnitude of the target. |
| r_mag | float32 | Sloan r' magnitude of the target. |
| i_mag | float32 | Sloan i' magnitude of the target. |
| z_mag | float32 | Sloan z' magnitude of the target. |
| optical_prov | string | Source of the optical magnitudes. |
| gaia_bp_mag | float32 | |
| gaia_rp_mag | float32 | |
| gaia_g_mag | float32 | Gaia G magnitude of the target. |
| h_mag | float32 | H-band magnitude of the target. |
| delta_ra | float32 | Fixed RA offset as a true angle, in arcsec. |
| delta_dec | float32 | Fixed Dec offset, in arcsec. |
| inertial | boolean | `true` if not offset correction should be applied based on target magnitude. `false` otherwise. |
| n_exposures | int16 | The minimum number of exposures required for the ToO to be complete and not assigned anymore. [required] |
| priority | int16 | |
| active | boolean | `true` if the target is active and should be assigned to configurations if possible. [required] |
| expiration_date | int32 | MJD at which the target should automatically be consider inactive. If empty, the target never expires. |
| observed | boolean | `true` if the target has been fully observed and should not be assigned again. [required] |
| Column | Type | Description |
|---------------------|---------|----------------------------------------------------------------------------------------------------------------------|
| too_id | int64 | Unique identifier for the ToO target. [required] |
| fiber_type | string | Type of fiber to be used to observe the target. [required. |
| catalogid | int64 | catalogid for this target. |
| sdss_id | int64 | sdss_id for this target. |
| gaia_dr3_source_id | int64 | Unique identifier of the target in the Gaia DR3 catalog (`source_id` column). |
| twomass_pts_key | int32 | Unique identifier of the target in the 2MASS catalog (`pts_key` column). |
| sky_brightness_mode | string | The sky brightness mode. Either `bright` or `dark`. |
| ra | float64 | The Right Ascension of the target in ICRS coordinates as decimal degrees. [required] |
| dec | float64 | The declination of the target in ICRS coordinates as decimal degrees. [required] |
| pmra | float32 | The proper motion in RA in mas/yr as a true angle (the cos(dec) factor must have been applied). |
| pmdec | float32 | The proper motion in Dec in mas/yr as a true angle. |
| epoch | float32 | The epoch of the ra/dec coordinates. Required but only relevant if pmra/pmdec are defined. |
| parallax | float32 | The parallax in arcsec. |
| lambda_eff | float32 | The effective wavelength to calculate the atmospheric refraction correction for the target. |
| u_mag | float32 | Sloan u' magnitude of the target. |
| g_mag | float32 | Sloan g' magnitude of the target. |
| r_mag | float32 | Sloan r' magnitude of the target. |
| i_mag | float32 | Sloan i' magnitude of the target. |
| z_mag | float32 | Sloan z' magnitude of the target. |
| optical_prov | string | Source of the optical magnitudes. |
| gaia_bp_mag | float32 | |
| gaia_rp_mag | float32 | |
| gaia_g_mag | float32 | Gaia G magnitude of the target. |
| h_mag | float32 | H-band magnitude of the target. |
| delta_ra | float32 | Fixed RA offset as a true angle, in arcsec. |
| delta_dec | float32 | Fixed Dec offset, in arcsec. |
| can_offset | boolean | `true` if the ToO is allowed to be offset. Offseting will only occur if target violates magnitude limits. [required] |
| inertial | boolean | `true` if not offset correction should be applied based on target magnitude. `false` otherwise. |
| n_exposures | int16 | The minimum number of exposures required for the ToO to be complete and not assigned anymore. [required] |
| priority | int16 | |
| active | boolean | `true` if the target is active and should be assigned to configurations if possible. [required] |
| expiration_date | int32 | MJD at which the target should automatically be consider inactive. If empty, the target never expires. |
| observed | boolean | `true` if the target has been fully observed and should not be assigned again. [required]

At least one magnitude is required. If one of the Sloan magnitude is provided, *all* the ugriz values must be provided. A sample, valid ToO file can be found [here](docs/sample.csv).

Expand Down
2 changes: 2 additions & 0 deletions src/too/datamodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"h_mag": polars.Float32,
"delta_ra": polars.Float32,
"delta_dec": polars.Float32,
"can_offset": polars.Boolean,
"inertial": polars.Boolean,
"n_exposures": polars.Int16,
"priority": polars.Int16,
Expand Down Expand Up @@ -107,6 +108,7 @@
"h_mag": "H-band magnitude of the target.",
"delta_ra": "Fixed RA offset as a true angle, in arcsec.",
"delta_dec": "Fixed Dec offset, in arcsec.",
"can_offset": "`true` if the ToO is allowed to be offset. Offseting will only occur if target violates magnitude limits. [required]",
"inertial": "`true` if not offset correction should be applied based on target magnitude. `false` otherwise.",
"n_exposures": "The minimum number of exposures required for the ToO to be complete and not assigned anymore. [required]",
"active": "`true` if the target is active and should be assigned to configurations if possible. [required]",
Expand Down

0 comments on commit 4f91c67

Please sign in to comment.