diff --git a/notebooks/20231011_sdss5_targeting.ipynb b/notebooks/20231011_sdss5_targeting.ipynb index bf3ef58..a528c3d 100644 --- a/notebooks/20231011_sdss5_targeting.ipynb +++ b/notebooks/20231011_sdss5_targeting.ipynb @@ -8,7 +8,8 @@ "\n", "This notebook shows you how to interpret SDSS-V targeting flags that are represented as a single column.\n", "\n", - "Andy Casey (andrew.casey@monash.edu)" + "Andy Casey (andrew.casey@monash.edu)\n", + "updated: Dec 19, 2024 - Sean Morrison" ] }, { @@ -23,7 +24,15 @@ { "cell_type": "code", "execution_count": 1, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2024-12-19T21:27:02.312381Z", + "iopub.status.busy": "2024-12-19T21:27:02.311596Z", + "iopub.status.idle": "2024-12-19T21:27:03.052807Z", + "shell.execute_reply": "2024-12-19T21:27:03.052140Z", + "shell.execute_reply.started": "2024-12-19T21:27:02.312336Z" + } + }, "outputs": [], "source": [ "import numpy as np\n", @@ -39,7 +48,15 @@ { "cell_type": "code", "execution_count": 2, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2024-12-19T21:27:03.054218Z", + "iopub.status.busy": "2024-12-19T21:27:03.053832Z", + "iopub.status.idle": "2024-12-19T21:27:03.064284Z", + "shell.execute_reply": "2024-12-19T21:27:03.063728Z", + "shell.execute_reply.started": "2024-12-19T21:27:03.054188Z" + } + }, "outputs": [ { "data": { @@ -49,12 +66,12 @@ "NAXIS = 0 / number of array dimensions \n", "EXTEND = T \n", " \n", - " METADATA \n", + " Metadata \n", " \n", - "V_ASTRA = '0.4.4 ' / Astra version \n", - "CREATED = '23-10-06 10:40:16' / File creation time (UTC %y-%m-%d %H:%M:%S) \n", + "V_ASTRA = '0.5.0 ' / Astra version \n", + "CREATED = '23-11-16 00:00:06' / File creation time (UTC %y-%m-%d %H:%M:%S) \n", " \n", - " HDU DESCRIPTIONS \n", + " HDU Descriptions \n", " \n", "COMMENT HDU 0: Summary information only \n", "COMMENT HDU 1: BOSS spectra taken at Apache Point Observatory \n", @@ -76,7 +93,15 @@ { "cell_type": "code", "execution_count": 3, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2024-12-19T21:27:03.066851Z", + "iopub.status.busy": "2024-12-19T21:27:03.066588Z", + "iopub.status.idle": "2024-12-19T21:27:11.175001Z", + "shell.execute_reply": "2024-12-19T21:27:11.174298Z", + "shell.execute_reply.started": "2024-12-19T21:27:03.066827Z" + } + }, "outputs": [], "source": [ "# Let's play with flags for spectra observed by BOSS.\n", @@ -90,14 +115,20 @@ { "cell_type": "code", "execution_count": 4, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2024-12-19T21:27:11.176355Z", + "iopub.status.busy": "2024-12-19T21:27:11.176034Z", + "iopub.status.idle": "2024-12-19T21:27:14.450224Z", + "shell.execute_reply": "2024-12-19T21:27:14.449068Z", + "shell.execute_reply.started": "2024-12-19T21:27:11.176325Z" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "ops_sky_apogee_0.1.0: 24\n", - "ops_sky_boss_0.1.0: 8314\n", "ops_std_boss_tic_0.1.3: 2024\n", "ops_std_eboss_0.5.0: 32272\n", "ops_std_boss_0.5.0: 92657\n", @@ -135,29 +166,24 @@ "mwm_halo_bb_boss_0.5.0: 23\n", "mwm_cb_300pc_apogee_0.5.0: 57\n", "mwm_cb_300pc_boss_0.5.0: 13\n", - "bhm_spiders_agn_gaiadr2_0.5.0: 323\n", - "bhm_spiders_agn_lsdr8_0.5.0: 14762\n", - "bhm_spiders_agn_efeds_stragglers_0.5.0: 7867\n", - "bhm_spiders_agn_ps1dr2_0.5.0: 5229\n", - "bhm_spiders_agn_skymapperdr2_0.5.0: 43\n", - "bhm_spiders_agn_supercosmos_0.5.0: 926\n", - "bhm_spiders_clusters_lsdr8_0.5.0: 1262\n", - "bhm_spiders_clusters_ps1dr2_0.5.0: 692\n", - "bhm_spiders_clusters_efeds_stragglers_0.5.0: 437\n", - "bhm_gua_bright_0.5.0: 32371\n", - "bhm_gua_dark_0.5.0: 31940\n", + "bhm_spiders_agn_gaiadr2_0.5.0: 76\n", + "bhm_spiders_agn_lsdr8_0.5.0: 197\n", + "bhm_spiders_agn_efeds_stragglers_0.5.0: 94\n", + "bhm_spiders_agn_ps1dr2_0.5.0: 943\n", + "bhm_spiders_agn_skymapperdr2_0.5.0: 4\n", + "bhm_spiders_agn_supercosmos_0.5.0: 36\n", + "bhm_spiders_clusters_ps1dr2_0.5.0: 1\n", + "bhm_gua_bright_0.5.0: 571\n", + "bhm_gua_dark_0.5.0: 386\n", "mwm_cb_uvex5_0.5.0: 601\n", - "bhm_rm_known_spec_0.5.0: 87625\n", - "bhm_rm_core_0.5.0: 5206\n", - "bhm_rm_var_0.5.0: 172\n", - "bhm_rm_ancillary_0.5.0: 40\n", + "bhm_rm_known_spec_0.5.0: 1528\n", "ops_std_boss_lsdr8_0.5.0: 7623\n", "ops_std_boss_ps1dr2_0.5.0: 42827\n", "ops_std_boss_gdr2_0.5.0: 42126\n", - "bhm_aqmes_med_0.5.0: 14252\n", - "bhm_aqmes_med_faint_0.5.0: 34375\n", - "bhm_csc_boss_dark_0.5.0: 9823\n", - "bhm_csc_boss_bright_0.5.0: 1895\n", + "bhm_aqmes_med_0.5.0: 377\n", + "bhm_aqmes_med_faint_0.5.0: 910\n", + "bhm_csc_boss_dark_0.5.0: 9820\n", + "bhm_csc_boss_bright_0.5.0: 1903\n", "bhm_csc_apogee_0.5.0: 40\n", "mwm_yso_pms_apogee_0.5.1: 12058\n", "mwm_yso_pms_boss_0.5.1: 14854\n", @@ -180,17 +206,16 @@ "openfibertargets_nov2020_1000_0.5.3: 12\n", "openfibertargets_nov2020_1001a_0.5.3: 2453\n", "openfibertargets_nov2020_1001b_0.5.3: 149\n", - "openfibertargets_nov2020_11_0.5.3: 1273\n", + "openfibertargets_nov2020_11_0.5.3: 79\n", "openfibertargets_nov2020_12_0.5.3: 230\n", "openfibertargets_nov2020_14_0.5.3: 49\n", "openfibertargets_nov2020_15_0.5.3: 217\n", "openfibertargets_nov2020_17_0.5.3: 389\n", - "openfibertargets_nov2020_18_0.5.3: 2998\n", + "openfibertargets_nov2020_18_0.5.3: 257\n", "openfibertargets_nov2020_22_0.5.3: 136\n", "openfibertargets_nov2020_24_0.5.3: 23226\n", "openfibertargets_nov2020_25_0.5.3: 22068\n", - "openfibertargets_nov2020_26_0.5.3: 34\n", - "openfibertargets_nov2020_27_0.5.3: 8362\n", + "openfibertargets_nov2020_27_0.5.3: 238\n", "openfibertargets_nov2020_28a_0.5.3: 1985\n", "openfibertargets_nov2020_28b_0.5.3: 2876\n", "openfibertargets_nov2020_28c_0.5.3: 1953\n", @@ -198,7 +223,7 @@ "openfibertargets_nov2020_3_0.5.3: 470\n", "openfibertargets_nov2020_31_0.5.3: 2\n", "openfibertargets_nov2020_32_0.5.3: 640\n", - "openfibertargets_nov2020_33_0.5.3: 2523\n", + "openfibertargets_nov2020_33_0.5.3: 57\n", "openfibertargets_nov2020_35a_0.5.3: 9450\n", "openfibertargets_nov2020_35b_0.5.3: 236\n", "openfibertargets_nov2020_35c_0.5.3: 767\n", @@ -210,12 +235,12 @@ "openfibertargets_nov2020_19c_0.5.3: 14\n", "manual_nsbh_apogee_0.5.3: 10\n", "manual_nsbh_boss_0.5.3: 26\n", - "manual_bhm_spiders_comm_0.5.3: 3995\n", - "bhm_aqmes_bonus_bright_0.5.4: 1283\n", - "bhm_aqmes_bonus_core_0.5.4: 1482\n", - "bhm_aqmes_bonus_faint_0.5.4: 45821\n", - "bhm_aqmes_wide2_0.5.4: 18590\n", - "bhm_aqmes_wide2_faint_0.5.4: 31762\n", + "manual_bhm_spiders_comm_0.5.3: 25\n", + "bhm_aqmes_bonus_bright_0.5.4: 45\n", + "bhm_aqmes_bonus_core_0.5.4: 22\n", + "bhm_aqmes_bonus_faint_0.5.4: 1166\n", + "bhm_aqmes_wide2_0.5.4: 226\n", + "bhm_aqmes_wide2_faint_0.5.4: 1047\n", "mwm_cb_300pc_boss_0.5.4: 32\n", "openfibertargets_nov2020_5_0.5.3: 622\n", "openfibertargets_nov2020_6a_0.5.3: 758\n", @@ -228,23 +253,13 @@ "manual_bright_targets_g13_offset_fixed_3_0.5.3: 518\n", "manual_bright_targets_g13_offset_fixed_5_0.5.3: 518\n", "manual_bright_targets_g13_offset_fixed_7_0.5.3: 516\n", - "ops_sky_boss_best_0.5.7: 2141\n", - "ops_sky_boss_good_0.5.7: 3\n", - "ops_sky_boss_best_0.5.8: 6728\n", - "ops_sky_boss_good_0.5.8: 11861\n", - "ops_sky_apogee_best_0.5.8: 13325\n", "manual_fps_position_stars_0.5.3: 12629\n", - "ops_sky_boss_best_0.5.9: 12911\n", - "ops_sky_boss_good_0.5.9: 141324\n", - "ops_sky_apogee_best_0.5.9: 23691\n", - "ops_sky_apogee_good_0.5.9: 8\n", "manual_fps_position_stars_10_0.5.3: 52365\n", - "ops_sky_boss_fallback_0.5.12: 22702\n", "openfibertargets_nov2020_34a_0.5.13: 115069\n", "openfibertargets_nov2020_34b_0.5.13: 7365\n", - "bhm_csc_boss_0.5.15: 14108\n", - "bhm_csc_apogee_0.5.15: 301\n", - "bhm_colr_galaxies_lsdr8_0.5.16: 8910\n", + "bhm_csc_boss_0.5.15: 14123\n", + "bhm_csc_apogee_0.5.15: 303\n", + "bhm_colr_galaxies_lsdr8_0.5.16: 98\n", "mwm_yso_cluster_apogee_0.5.17: 8688\n", "mwm_yso_cluster_boss_0.5.17: 16027\n", "mwm_yso_cmz_apogee_0.5.17: 163\n", @@ -268,8 +283,8 @@ "manual_offset_mwmhalo_offb_0.5.13: 7\n", "manual_bright_target_offsets_3_0.5.20: 442\n", "ops_std_apogee_0.5.22: 417\n", - "manual_bhm_spiders_comm_lco_0.5.23: 4786\n", - "ops_std_boss_lsdr10_1.0.5: 1083\n", + "manual_bhm_spiders_comm_lco_0.5.23: 848\n", + "ops_std_boss_lsdr10_1.0.5: 1072\n", "mwm_yso_cluster_apogee_1.0.6: 6288\n", "mwm_yso_cluster_boss_1.0.6: 12336\n", "mwm_yso_disk_apogee_1.0.6: 4580\n", @@ -281,9 +296,9 @@ "mwm_yso_pms_apogee_zari18pms_1.0.6: 2325\n", "mwm_yso_pms_boss_sagitta_edr3_1.0.6: 8809\n", "mwm_yso_pms_boss_zari18pms_1.0.6: 2634\n", - "openfibertargets_nov2020_11_1.0.7: 109\n", - "openfibertargets_nov2020_18_1.0.7: 1070\n", - "openfibertargets_nov2020_27_1.0.7: 197\n", + "openfibertargets_nov2020_11_1.0.7: 6\n", + "openfibertargets_nov2020_18_1.0.7: 111\n", + "openfibertargets_nov2020_27_1.0.7: 7\n", "mwm_yso_nebula_apogee_1.0.8: 3\n", "manual_mwm_halo_distant_kgiant_1.0.7: 2\n", "openfibertargets_nov2020_10_1.0.7: 1\n", @@ -306,10 +321,10 @@ "openfibertargets_nov2020_8_1.0.7: 1678\n", "openfibertargets_nov2020_9_1.0.7: 1155\n", "openfibertargets_nov2020_28a_1.0.7: 131\n", - "openfibertargets_nov2020_33_1.0.10: 786\n", + "openfibertargets_nov2020_33_1.0.10: 14\n", "ops_std_boss_gdr2_1.0.13: 18060\n", "ops_std_apogee_1.0.14: 401\n", - "ops_std_eboss_1.0.15: 8471\n", + "ops_std_eboss_1.0.15: 8472\n", "ops_std_boss_1.0.16: 41774\n", "ops_std_boss_red_1.0.16: 9570\n", "ops_std_boss_tic_1.0.16: 22638\n", @@ -335,22 +350,22 @@ "mwm_yso_pms_boss_sagitta_edr3_single_1.0.33: 1604\n", "mwm_yso_pms_boss_zari18pms_single_1.0.33: 537\n", "ops_std_boss_ps1dr2_1.0.29: 10322\n", - "bhm_csc_boss_1.0.37: 7165\n", - "bhm_csc_apogee_1.0.37: 486\n", - "bhm_gua_dark_1.0.37: 37783\n", - "bhm_gua_bright_1.0.37: 19841\n", - "bhm_spiders_clusters_lsdr10_1.0.37: 337\n", - "bhm_spiders_agn_lsdr10_1.0.37: 18594\n", - "bhm_spiders_agn_hard_1.0.37: 53\n", - "bhm_spiders_agn_gaiadr3_1.0.37: 2101\n", - "bhm_spiders_agn_tda_1.0.37: 120\n", - "bhm_aqmes_med_1.0.37: 13719\n", - "bhm_aqmes_med_faint_1.0.37: 19653\n", - "bhm_aqmes_wide2_1.0.37: 18205\n", - "bhm_aqmes_wide2_faint_1.0.37: 12689\n", - "bhm_aqmes_bonus_core_1.0.37: 1202\n", - "bhm_aqmes_bonus_bright_1.0.37: 357\n", - "bhm_aqmes_bonus_faint_1.0.37: 32214\n", + "bhm_csc_boss_1.0.37: 7195\n", + "bhm_csc_apogee_1.0.37: 495\n", + "bhm_gua_dark_1.0.37: 1809\n", + "bhm_gua_bright_1.0.37: 701\n", + "bhm_spiders_clusters_lsdr10_1.0.37: 6\n", + "bhm_spiders_agn_lsdr10_1.0.37: 560\n", + "bhm_spiders_agn_hard_1.0.37: 1\n", + "bhm_spiders_agn_gaiadr3_1.0.37: 236\n", + "bhm_spiders_agn_tda_1.0.37: 3\n", + "bhm_aqmes_med_1.0.37: 350\n", + "bhm_aqmes_med_faint_1.0.37: 555\n", + "bhm_aqmes_wide2_1.0.37: 223\n", + "bhm_aqmes_wide2_faint_1.0.37: 968\n", + "bhm_aqmes_bonus_core_1.0.37: 26\n", + "bhm_aqmes_bonus_bright_1.0.37: 27\n", + "bhm_aqmes_bonus_faint_1.0.37: 864\n", "manual_mwm_crosscalib_apogee_1.0.35: 6\n", "manual_mwm_crosscalib_yso_apogee_1.0.35: 275\n", "manual_mwm_crosscalib_yso_boss_1.0.35: 173\n", @@ -367,7 +382,7 @@ "manual_mwm_halo_vmp_wise_apogee_single_1.0.35: 8\n", "manual_mwm_halo_vmp_wise_boss_1.0.35: 16\n", "manual_mwm_halo_vmp_wise_boss_single_1.0.35: 251\n", - "bhm_colr_galaxies_lsdr10_1.0.38: 1669\n", + "bhm_colr_galaxies_lsdr10_1.0.38: 126\n", "manual_mwm_validation_cool_apogee_1.0.35: 12\n", "manual_mwm_validation_cool_boss_1.0.35: 1410\n", "manual_mwm_validation_hot_boss_1.0.35: 9\n", @@ -404,7 +419,7 @@ "mwm_snc_ext_main_apogee_1.0.41: 318\n", "mwm_snc_ext_filler_apogee_1.0.41: 64\n", "mwm_snc_ext_main_boss_1.0.41: 2230\n", - "mwm_snc_ext_filler_boss_1.0.41: 18739\n", + "mwm_snc_ext_filler_boss_1.0.41: 18741\n", "mwm_wd_pwd_boss_1.0.42: 24181\n", "mwm_wd_gaia_boss_1.0.42: 257\n", "mwm_cb_galex_mag_boss_1.0.42: 6484\n", @@ -421,10 +436,9 @@ "manual_mwm_nsbh_boss_1.0.46: 17\n", "mwm_cb_cvcandidates_boss_1.0.47: 433\n", "mwm_legacy_ir2opt_boss_1.0.47: 1549\n", - "bhm_rm_core_1.0.48: 15907\n", - "bhm_rm_known_spec_1.0.48: 57906\n", - "bhm_rm_var_1.0.48: 1772\n", - "bhm_rm_ancillary_1.0.48: 6095\n", + "bhm_rm_core_1.0.48: 350\n", + "bhm_rm_known_spec_1.0.48: 564\n", + "bhm_rm_ancillary_1.0.48: 186\n", "mwm_tess_2min_apogee_1.0.49: 2037\n", "mwm_tess_rgb_apogee_1.0.49: 2573\n", "manual_mwm_planet_gaia_astrometry_apogee_1.0.46: 1795\n", @@ -454,16 +468,24 @@ { "cell_type": "code", "execution_count": 5, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2024-12-19T21:27:14.452262Z", + "iopub.status.busy": "2024-12-19T21:27:14.451514Z", + "iopub.status.idle": "2024-12-19T21:27:18.457287Z", + "shell.execute_reply": "2024-12-19T21:27:18.456188Z", + "shell.execute_reply.started": "2024-12-19T21:27:14.452228Z" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "mwm: 340,581\n", - "ops: 473,860\n", - "bhm: 311,903\n", - "open: 259,514\n" + "mwm: 340,583\n", + "ops: 281,127\n", + "bhm: 20,601\n", + "open: 244,699\n" ] } ], @@ -475,38 +497,46 @@ { "cell_type": "code", "execution_count": 6, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2024-12-19T21:27:18.459105Z", + "iopub.status.busy": "2024-12-19T21:27:18.458476Z", + "iopub.status.idle": "2024-12-19T21:27:22.334137Z", + "shell.execute_reply": "2024-12-19T21:27:22.333037Z", + "shell.execute_reply.started": "2024-12-19T21:27:18.459068Z" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "mwm_snc: 47,419\n", + "mwm_snc: 47,421\n", "mwm_cb: 51,501\n", "mwm_halo: 21,973\n", "mwm_yso: 56,822\n", "mwm_rv: 766\n", "mwm_ob: 98,649\n", - "ops_std: 234,635\n", + "ops_std: 234,624\n", "mwm_wd: 26,603\n", "mwm_gg: 0\n", "mwm_planet: 6,115\n", - "bhm_aqmes: 32,289\n", - "bhm_filler: 163,877\n", + "bhm_aqmes: 588\n", + "bhm_filler: 5,489\n", "mwm_tessrgb: 3,849\n", - "bhm_csc: 17,743\n", - "ops_sky: 180,496\n", - "bhm_rm: 92,919\n", - "bhm_spiders: 38,342\n", + "bhm_csc: 17,770\n", + "ops_sky: 0\n", + "bhm_rm: 1,528\n", + "bhm_spiders: 1,929\n", "mwm_dust: 47\n", "mwm_legacy: 18,978\n", "mwm_galactic: 4,697\n", "mwm_filler: 28,594\n", "mwm_tess_ob: 0\n", "mwm_erosita: 4,490\n", - "open_fiber: 259,514\n", - "commissioning: 62,273\n", - "SKY: 32,201\n", + "open_fiber: 244,699\n", + "commissioning: 54,365\n", + "SKY: 0\n", "mwm_tessob: 0\n", "mwm_magcloud: 0\n", "mwm_bin: 3,488\n", @@ -531,6 +561,7 @@ "The easiest way to do this is with the following methods:\n", "- `TargetingFlags.in_carton_pk`: If you know the database primary key (`targetdb.carton.pk`) of your carton\n", "- `TargetingFlags.in_carton_name`: If you know the name of your carton.\n", + "- `TargetingFlags.in_carton_label`: If you know the name and version (name_ver) of your carton\n", "- `TargetingFlags.in_mapper`: To select by mapper (e.g., BHM, MWM)\n", "- `TargetingFlags.in_program`: To select by program name.\n", "- `TargetingFlags.in_alt_name`: To select by alternative name, curated with thanks by Marina Koukel.\n", @@ -541,7 +572,7 @@ "- `TargetingFlags.all_mappers`: a tuple of all unique mapper names;\n", "- `TargetingFlags.all_programs`: a tuple of all unique program names;\n", "- `TargetingFlags.all_carton_names`: a tuple of all unique carton names;\n", - "- `TargetingFlags.all_alt_names`: a tuple of all unique alternative names;\n", + "- `TargetingFlags.all_alt_carton_names`: a tuple of all unique alternative names;\n", "- `TargetingFlags.all_alt_programs`: a tuple of all unique alternative program names;\n", "\n", "or you can look this up from `TargetingFlags.mapping`." @@ -549,8 +580,16 @@ }, { "cell_type": "code", - "execution_count": 7, - "metadata": {}, + "execution_count": 9, + "metadata": { + "execution": { + "iopub.execute_input": "2024-12-19T21:29:00.544519Z", + "iopub.status.busy": "2024-12-19T21:29:00.543740Z", + "iopub.status.idle": "2024-12-19T21:29:00.553648Z", + "shell.execute_reply": "2024-12-19T21:29:00.553080Z", + "shell.execute_reply.started": "2024-12-19T21:29:00.544493Z" + } + }, "outputs": [ { "name": "stdout", @@ -559,475 +598,475 @@ "Mappers:\n", "\tmwm\n", "\topen\n", - "\tops\n", "\tbhm\n", + "\tops\n", "Programs\n", - "\tSKY\n", "\tmwm_erosita\n", - "\topen_fiber\n", - "\tmwm_legacy\n", - "\tmwm_yso\n", - "\tmwm_tessob\n", - "\tmwm_halo\n", + "\tmwm_snc\n", + "\tmwm_dust\n", "\tbhm_filler\n", + "\tmwm_tess_ob\n", + "\tmwm_ob\n", "\tmwm_monitor\n", - "\tmwm_snc\n", + "\tops_sky\n", + "\tbhm_csc\n", "\tops_std\n", "\tmwm_bin\n", - "\tcommissioning\n", - "\tbhm_csc\n", - "\tmwm_filler\n", + "\tmwm_yso\n", "\tmwm_galactic\n", - "\tbhm_rm\n", - "\tmwm_dust\n", - "\tops_sky\n", + "\tbhm_spiders\n", + "\topen_fiber\n", + "\tbhm_aqmes\n", "\tmwm_magcloud\n", "\tmwm_gg\n", - "\tbhm_spiders\n", - "\tmwm_rv\n", - "\tmwm_wd\n", - "\tmwm_ob\n", "\tmwm_tessrgb\n", - "\tbhm_aqmes\n", - "\tmwm_planet\n", - "\tmwm_tess_ob\n", + "\tmwm_legacy\n", "\tmwm_validation\n", "\tmwm_cb\n", + "\tmwm_wd\n", + "\tmwm_tessob\n", + "\tmwm_rv\n", + "\tcommissioning\n", + "\tbhm_rm\n", + "\tSKY\n", + "\tmwm_halo\n", + "\tmwm_planet\n", + "\tmwm_filler\n", "Cartons names\n", - "\tbhm_spiders_agn_gaiadr2\n", - "\tmwm_snc_250pc_apogee\n", - "\tmwm_bin_gaia_sb_boss\n", - "\tmanual_offset_mwmhalo_off05\n", - "\topenfibertargets_nov2020_47d\n", - "\tops_std_boss_tic\n", - "\topenfibertargets_nov2020_47e\n", - "\tmwm_halo_bb_boss\n", - "\tbhm_spiders_agn-efeds\n", - "\tmwm_erosita_stars\n", - "\tmanual_bhm_spiders_comm\n", - "\tmwm_erosita_stars_boss\n", - "\tmwm_gg_core\n", - "\topenfibertargets_nov2020_32\n", - "\topenfibertargets_nov2020_31\n", - "\tmwm_halo_local_high_apogee\n", - "\tmwm_yso_cluster_apogee\n", - "\tmwm_legacy_ir2opt\n", - "\tops_sky_apogee\n", - "\tmwm_yso_cmz_apogee\n", + "\tmanual_bright_targets_g13\n", + "\tmwm_halo_sm\n", + "\tmanual_mwm_halo_mp_wise_apogee_single\n", + "\tmwm_halo_nmp_xp_apogee\n", + "\tmanual_bright_target_offsets_1_g13\n", + "\tmwm_snc_ext_main_apogee\n", + "\tmwm_halo_mp_xp_apogee\n", "\tmwm_tess_planet\n", + "\topenfibertargets_nov2020_15\n", + "\tmwm_galactic_core_dist_apogee\n", + "\tmwm_snc_100pc_boss\n", + "\tmwm_yso_embedded_apogee_single\n", + "\tmwm_erosita_compact_boss_shallow\n", "\tmwm_cb_gaiagalex_boss\n", - "\tmwm_yso_nebula_apogee\n", - "\tmwm_snc_100pc_apogee\n", - "\topenfibertargets_nov2020_24\n", + "\tmanual_bright_targets_g13_offset_fixed_7\n", + "\tmanual_mwm_halo_mp_bbb\n", "\tbhm_spiders_agn_sep\n", - "\tmwm_rv_long-bplates\n", - "\tops_std_boss_ps1dr2\n", - "\tmwm_snc_250pc\n", + "\tmwm_monitor_m15_apogee_long\n", + "\tbhm_aqmes_bonus_core\n", + "\tbhm_csc_boss-dark\n", + "\tmwm_ob_cepheids\n", + "\tmwm_halo_vmp_xp_apogee_single\n", + "\tmanual_bhm_spiders_comm_lco\n", + "\tbhm_aqmes_bonus-bright\n", + "\tmanual_mwm_halo_vmp_wise_boss\n", + "\tmwm_snc_100pc_apogee\n", + "\tmwm_wd_gaia_boss\n", + "\tmanual_mwm_planet_sphere_apogee\n", + "\tmanual_mwm_planet_gpi_apogee\n", + "\tmanual_nsbh_apogee\n", + "\tmanual_bhm_spiders_comm\n", + "\tmanual_mwm_planet_ca_legacy_apogee\n", + "\tmwm_yso_cluster_boss\n", + "\tmanual_mwm_halo_distant_kgiant\n", + "\tmwm_cb_uvex3\n", + "\tmanual_mwm_planet_sophie_apogee\n", + "\topenfibertargets_nov2020_35a\n", + "\tmwm_cb_300pc_boss\n", + "\tbhm_rm_core\n", + "\topenfibertargets_nov2020_35b\n", + "\topenfibertargets_nov2020_29\n", "\tbhm_csc_boss\n", - "\tmwm_snc_100pc\n", - "\tops_sky_boss_good\n", + "\tmwm_wd_pwd_boss\n", + "\tmanual_mwm_validation_cool_apogee\n", + "\tmwm_rv_short-fps\n", + "\tmwm_halo_local_high_boss_single\n", + "\tops_sky_boss_best\n", + "\tbhm_rm_ancillary\n", + "\tmwm_monitor_m67_apogee_short\n", + "\topenfibertargets_nov2020_47e\n", + "\tmwm_yso_ob\n", + "\tmwm_halo_local_low_boss\n", + "\tmwm_astar_core_boss\n", + "\tmwm_halo_local_high_boss\n", + "\topenfibertargets_nov2020_1001a\n", + "\tmwm_yso_disk_boss_single\n", + "\tmwm_astar_core_boss_single\n", + "\tmwm_tessrgb_core\n", "\tmwm_yso_pms_boss_zari18pms_single\n", - "\tops_std_eboss\n", - "\tmwm_ob_core_boss\n", - "\tbhm_rm_xrayqso\n", - "\tmwm_halo_local_low_boss_single\n", - "\tmanual_mwm_halo_mp_bbb\n", - "\tbhm_spiders_clusters_ps1dr2\n", - "\tmwm_halo_mp_xp_boss_single\n", + "\tmwm_magcloud_rgb_boss\n", + "\tmwm_tess_ob\n", + "\tmwm_halo_distant_rrl_boss_single\n", + "\tbhm_aqmes_med\n", "\topenfibertargets_nov2020_5\n", - "\topenfibertargets_nov2020_1001a\n", - "\tbhm_aqmes_wide2-faint\n", - "\topenfibertargets_nov2020_15\n", + "\topenfibertargets_nov2020_47d\n", + "\topenfibertargets_nov2020_47b\n", + "\tmanual_mwm_halo_distant_bhb_boss\n", + "\tmwm_snc_250pc\n", + "\tmanual_mwm_magcloud_symbiotic_apogee\n", + "\tmwm_yso_s2\n", + "\tbhm_aqmes_wide3-faint\n", "\tmwm_yso_pms_boss_sagitta_edr3\n", - "\tmwm_monitor_n188_apogee_long\n", - "\topenfibertargets_nov2020_35b\n", - "\tmwm_erosita_compact_boss\n", - "\tmwm_yso_embedded_apogee\n", - "\tbhm_aqmes_wide2\n", - "\tmanual_offset_mwmhalo_off10\n", - "\tmwm_cb_300pc_boss\n", - "\tbhm_rm_known-spec\n", - "\tbhm_spiders_clusters_lsdr8\n", - "\tmwm_yso_cmz_apogee_single\n", - "\tmanual_mwm_magcloud_massive_boss\n", - "\tmanual_mwm_nsbh_apogee\n", - "\tmwm_halo_mp_xp_boss\n", + "\tmwm_monitor_n188_apogee_short\n", + "\tmwm_bin_gaia_sb_apogee\n", "\topenfibertargets_nov2020_8\n", - "\tmwm_astar_core_boss\n", - "\tmwm_yso_pms_apogee_zari18pms\n", - "\topenfibertargets_nov2020_34a\n", - "\tops_sky_boss_best\n", - "\tbhm_csc_apogee\n", - "\tmwm_cb_xmmom_boss\n", - "\tbhm_csc_boss_dark\n", - "\tmwm_dust_core_dist_apogee\n", - "\tmanual_fps_position_stars_lco_apogee_10\n", - "\tmwm_tessrgb_core\n", - "\tmwm_dust_core\n", - "\tmwm_halo_nmp_xp_boss_single\n", - "\tbhm_spiders_clusters-efeds-ls-redmapper\n", - "\tmanual_bright_target_offsets_1_g13\n", + "\tmwm_yso_nebula_apogee\n", + "\tmanual_mwm_halo_vmp_wise_boss_single\n", + "\tmwm_rv_long-bplates\n", + "\tmanual_mwm_crosscalib_yso_apogee\n", + "\tmwm_snc_100pc\n", + "\tmwm_yso_disk_apogee_single\n", + "\tmanual_mwm_validation_hot_boss\n", + "\topenfibertargets_nov2020_47c\n", + "\tmanual_bright_targets_g13_offset_fixed_1\n", + "\tbhm_spiders_agn_supercosmos\n", + "\tmwm_yso_cluster_apogee_single\n", + "\tmwm_cb_uvex2\n", + "\tmwm_yso_nebula_apogee_single\n", + "\tmwm_yso_variable_apogee\n", + "\tmwm_yso_pms_boss_zari18pms\n", + "\tmwm_yso_cmz_apogee\n", + "\tbhm_rm_known-spec\n", + "\tbhm_aqmes_wide2_faint\n", + "\tmanual_mwm_halo_vmp_wise_apogee_single\n", + "\tmanual_fps_position_stars_10\n", + "\tops_sky_boss\n", + "\topenfibertargets_nov2020_27\n", + "\tmanual_offset_mwmhalo_offb\n", + "\tmwm_ob_core_boss\n", + "\tmwm_yso_variable_apogee_single\n", + "\tbhm_colr_galaxies_lsdr10\n", + "\tmwm_yso_disk_boss\n", + "\tmwm_bin_vis_apogee\n", + "\tmwm_cb_cvcandidates\n", + "\topenfibertargets_nov2020_19a\n", "\tmwm_cb_galex_vol_boss\n", - "\tmwm_cb_uvex5\n", - "\tmwm_magcloud_agb_apogee\n", - "\topenfibertargets_nov2020_28b\n", - "\tmwm_cb_cvcandidates_boss\n", - "\tmwm_rv_short-rm\n", - "\tmwm_yso_s2-5\n", - "\tmwm_yso_pms_boss_sagitta_edr3_single\n", - "\tmanual_mwm_halo_vmp_wise_boss\n", - "\tmwm_monitor_n188_apogee_short\n", - "\tmanual_nsbh_boss\n", - "\tbhm_rm_core\n", - "\tmwm_monitor_m67_apogee_long\n", + "\tops_sky_boss_fallback\n", + "\tmwm_tess_2min_apogee\n", "\tmanual_mwm_halo_distant_kgiant_far_boss\n", + "\tmwm_halo_distant_rrl_boss\n", + "\topenfibertargets_nov2020_6b\n", + "\tmwm_planet_tess\n", + "\tops_std_boss_lsdr8\n", + "\tmanual_mwm_planet_tess_eb_apogee\n", "\tmwm_snc_ext_main_boss\n", - "\tmanual_mwm_magcloud_massive_apogee\n", - "\tmanual_mwm_halo_mp_wise_boss\n", - "\tmwm_tess_2min_apogee\n", - "\tmwm_yso_ob\n", - "\tmanual_bhm_spiders_comm_lco\n", - "\tops_std_apogee\n", - "\tmwm_yso_disk_boss\n", - "\tbhm_colr_galaxies_lsdr10\n", - "\topenfibertargets_nov2020_26\n", - "\tmanual_mwm_planet_ca_legacy_apogee\n", - "\tmanual_mwm_planet_known_apogee\n", - "\tops_std_boss_lsdr10\n", - "\tmwm_yso_pms_apogee_sagitta_edr3_single\n", - "\tmwm_yso_pms_apogee_sagitta_edr3\n", - "\tmwm_cb_galex_mag_boss\n", - "\tmanual_mwm_halo_distant_kgiant_near_boss_single\n", - "\tmanual_mwm_validation_rv_apogee\n", - "\tops_std_boss_gdr2\n", - "\tbhm_spiders_clusters-efeds-erosita\n", - "\tmanual_bright_targets_g13_offset_fixed_1\n", - "\tbhm_aqmes_med\n", - "\topenfibertargets_nov2020_18\n", + "\tbhm_gua_bright\n", + "\tbhm_aqmes_med-faint\n", + "\tmwm_cb_cvcandidates_apogee\n", + "\tmwm_bin_rv_short_mdwarf_apogee_12epoch\n", + "\tmwm_cb_300pc\n", + "\tmanual_mwm_halo_mp_wise_boss_single\n", + "\tmanual_mwm_nsbh_apogee\n", + "\tmwm_halo_bb\n", + "\tmwm_bin_rv_short_subgiant_apogee\n", + "\topenfibertargets_nov2020_35c\n", + "\tmwm_bin_rv_short_mdwarf_apogee_18epoch\n", + "\tmwm_yso_s3\n", + "\topenfibertargets_nov2020_46\n", + "\tmanual_mwm_halo_mp_wise_apogee\n", + "\tmanual_offset_mwmhalo_off20\n", + "\tbhm_csc_boss_bright\n", + "\tmwm_legacy_ir2opt\n", + "\tmwm_erosita_compact_gen\n", + "\tmwm_cb_gaiagalex_apogee\n", + "\tmwm_cb_xmmom_boss\n", + "\tbhm_colr_galaxies_lsdr8\n", + "\tmwm_halo_mp_xp_boss\n", + "\topenfibertargets_nov2020_19c\n", + "\tmanual_offset_mwmhalo_off30\n", + "\tmanual_nsbh_boss\n", + "\tmanual_mwm_validation_hot_apogee\n", + "\tbhm_spiders_agn_lsdr10\n", "\tmanual_fps_position_stars\n", - "\tmwm_halo_distant_rrl_boss_single\n", - "\topenfibertargets_nov2020_19b\n", - "\tmwm_tess_rgb_apogee\n", - "\tbhm_spiders_agn_skymapperdr2\n", - "\tmwm_halo_mp_xp_apogee_single\n", + "\topenfibertargets_nov2020_10\n", + "\topenfibertargets_nov2020_3\n", + "\tbhm_spiders_clusters_ps1dr2\n", + "\tmwm_yso_ob_boss\n", + "\tmanual_mwm_crosscalib_apogee\n", + "\tmwm_yso_pms_apogee_zari18pms_single\n", + "\tmanual_mwm_validation_rv_apogee\n", + "\tops_sky_apogee\n", + "\tmanual_mwm_halo_vmp_wise_apogee\n", "\tmwm_cb_uvex1\n", - "\tmwm_yso_pms_apogee\n", - "\tmanual_mwm_validation_hot_apogee\n", - "\tmwm_snc_ext_main_apogee\n", - "\tmwm_snc_ext_filler_boss\n", - "\tmanual_mwm_halo_distant_kgiant_near_boss\n", - "\tmanual_nsbh_apogee\n", - "\tmwm_rv_short-bplates\n", - "\topenfibertargets_nov2020_9\n", - "\tmanual_mwm_halo_distant_kgiant\n", - "\tbhm_spiders_agn_tda\n", + "\topenfibertargets_nov2020_14\n", + "\tbhm_spiders_agn-efeds\n", "\tmwm_halo_local_low_apogee\n", - "\tmanual_bright_targets_g13_offset_fixed_7\n", - "\tmwm_yso_variable_boss_single\n", - "\tbhm_rm_ancillary\n", - "\tmwm_yso_cluster\n", - "\tmwm_erosita_compact_var\n", - "\topenfibertargets_nov2020_17\n", - "\tmwm_yso_s1\n", - "\tmwm_rv_short_fps\n", - "\tmanual_mwm_planet_harps_apogee\n", - "\tmanual_offset_mwmhalo_off30\n", - "\tmwm_yso_embedded_apogee_single\n", - "\tmwm_halo_local_low_boss\n", - "\tmanual_mwm_nsbh_boss\n", - "\tmanual_mwm_planet_gpi_apogee\n", - "\tmanual_offset_mwmhalo_offa\n", - "\tops_std_boss_lsdr8\n", - "\tmwm_yso_disk_boss_single\n", + "\tmwm_erosita_compact_boss\n", + "\tmwm_cb_galex_mag_boss\n", "\topenfibertargets_nov2020_22\n", - "\tmwm_astar_core_boss_single\n", - "\topenfibertargets_nov2020_47c\n", - "\tmanual_mwm_validation_hot_boss\n", - "\tmanual_bright_target_offsets_3\n", - "\tmwm_bin_rv_short_rgb_apogee\n", - "\tmanual_mwm_planet_tess_eb_apogee\n", - "\tops_sky_apogee_good\n", - "\tops_apogee_stds\n", - "\tmwm_bin_gaia_sb_apogee\n", - "\tbhm_aqmes_wide3\n", - "\tmanual_mwm_tess_ob_apogee\n", - "\tmanual_fps_position_stars_apogee_10\n", - "\tbhm_aqmes_wide2_faint\n", - "\topenfibertargets_nov2020_19c\n", - "\tbhm_aqmes_bonus-dark\n", - "\tmwm_yso_disk_apogee_single\n", - "\topenfibertargets_nov2020_6c\n", - "\tbhm_aqmes_bonus-bright\n", - "\topenfibertargets_nov2020_28a\n", - "\tmwm_wd_gaia_boss\n", - "\tmanual_offset_mwmhalo_offb\n", - "\tmwm_cb_swiftuvot_boss\n", + "\tmwm_tess_rgb_apogee\n", + "\tmanual_mwm_halo_mp_wise_boss\n", + "\tmwm_galactic_core\n", + "\tbhm_spiders_clusters-efeds-ls-redmapper\n", + "\tops_std_boss\n", + "\topenfibertargets_nov2020_28b\n", + "\tmwm_yso_cluster_boss_single\n", + "\tmwm_cb_uvex4\n", + "\tmwm_monitor_m67_apogee_long\n", + "\topenfibertargets_nov2020_34a\n", "\tmanual_mwm_planet_gaia_astrometry_apogee\n", - "\tmwm_rv_long-rm\n", - "\tmanual_bright_target_offsets_1\n", + "\tmwm_yso_s1\n", + "\topenfibertargets_nov2020_12\n", + "\tbhm_csc_apogee\n", + "\tmwm_yso_variable_boss_single\n", + "\tbhm_spiders_agn_skymapperdr2\n", + "\topenfibertargets_nov2020_9\n", + "\tmanual_offset_mwmhalo_off00\n", "\tmwm_halo_sm_boss\n", - "\tmwm_bin_rv_long_apogee\n", - "\tmwm_snc_250pc_boss\n", - "\tmwm_yso_pms_boss\n", + "\tmwm_yso_disk_apogee\n", + "\topenfibertargets_nov2020_1000\n", "\tbhm_rm_var\n", - "\tbhm_csc_boss_bright\n", - "\topenfibertargets_nov2020_3\n", - "\tmwm_halo_nmp_xp_apogee\n", - "\tmwm_halo_vmp_xp_boss\n", - "\tmwm_cb_300pc_apogee\n", - "\tmwm_halo_local_low_apogee_single\n", - "\tbhm_gua_dark\n", - "\topenfibertargets_nov2020_29\n", - "\tmwm_yso_pms_apogee_zari18pms_single\n", - "\tmwm_ob_cepheids_boss\n", - "\topenfibertargets_nov2020_47b\n", - "\tbhm_colr_galaxies_lsdr8\n", - "\tmwm_galactic_core\n", - "\tmwm_cb_uvex3\n", - "\tmwm_yso_s3\n", - "\topenfibertargets_nov2020_6a\n", - "\tmwm_halo_distant_rrl_boss\n", - "\tmwm_halo_bb\n", - "\tmwm_bin_vis_apogee\n", - "\topenfibertargets_nov2020_47a\n", - "\tops_sky_boss\n", - "\tbhm_aqmes_bonus_bright\n", - "\tmwm_cb_gaiagalex\n", - "\tmwm_halo_vmp_xp_boss_single\n", - "\tmanual_mwm_halo_mp_wise_boss_single\n", - "\topenfibertargets_nov2020_46\n", - "\tmwm_cb_300pc\n", + "\topenfibertargets_nov2020_28a\n", + "\tmwm_dust_core\n", + "\tmwm_halo_local_low_boss_single\n", + "\tmanual_offset_mwmhalo_offa\n", + "\tmwm_yso_cluster_apogee\n", + "\tmwm_yso_pms_boss_sagitta_edr3_single\n", + "\tops_std_boss_tic\n", + "\tmwm_yso_pms_apogee\n", + "\tmanual_offset_mwmhalo_off10\n", "\tops_sky_apogee_best\n", - "\tmwm_ob_core_boss_single\n", + "\tmwm_halo_vmp_xp_apogee\n", + "\topenfibertargets_nov2020_24\n", + "\tmwm_halo_vmp_xp_boss\n", + "\tbhm_csc_boss_dark\n", + "\topenfibertargets_nov2020_19b\n", + "\tmwm_rv_long_fps\n", "\tmwm_rv_long_bplates\n", - "\tmwm_snc_ext_filler_apogee\n", - "\topenfibertargets_nov2020_1001b\n", - "\tbhm_spiders_clusters_lsdr10\n", - "\tmwm_yso_s2\n", - "\tmanual_mwm_validation_cool_apogee\n", - "\tmwm_halo_vmp_xp_apogee_single\n", - "\tbhm_csc_boss-bright\n", + "\tbhm_spiders_agn_tda\n", + "\tmwm_yso_s2-5\n", + "\tbhm_aqmes_bonus_faint\n", + "\tbhm_spiders_agn_gaiadr3\n", + "\tmwm_erosita_stars\n", + "\tmwm_cb_uvex5\n", "\topenfibertargets_nov2020_34b\n", - "\topenfibertargets_nov2020_14\n", - "\tmwm_yso_cluster_boss_single\n", - "\tmanual_mwm_halo_mp_wise_apogee\n", - "\tmwm_yso_disk_apogee\n", - "\tmwm_yso_ob_boss\n", - "\topenfibertargets_nov2020_10\n", - "\tbhm_spiders_clusters-efeds-hsc-redmapper\n", - "\tbhm_spiders_agn_lsdr10\n", - "\topenfibertargets_nov2020_28c\n", - "\tmwm_bin_gaia_astb_boss\n", - "\tmwm_cb_cvcandidates\n", - "\tmanual_fps_position_stars_10\n", - "\tops_sky_boss_fallback\n", - "\tmwm_halo_local_high_boss_single\n", + "\tmanual_mwm_halo_distant_bhb_boss_single\n", + "\tmwm_yso_cluster\n", + "\tbhm_aqmes_wide2-faint\n", + "\tmwm_cb_cvcandidates_boss\n", + "\tmwm_halo_nmp_xp_apogee_single\n", + "\tmwm_halo_mp_xp_boss_single\n", + "\tbhm_aqmes_bonus-dark\n", + "\topenfibertargets_nov2020_32\n", + "\tmanual_bright_target_offsets_3\n", + "\tmwm_snc_250pc_boss\n", + "\tmwm_erosita_stars_boss\n", + "\tmanual_mwm_nsbh_boss\n", + "\tmanual_mwm_tess_ob_apogee\n", + "\tmwm_yso_embedded_apogee\n", + "\tbhm_rm_xrayqso\n", + "\tmanual_mwm_halo_distant_kgiant_near_boss_single\n", + "\tops_sky_boss_good\n", + "\tops_std_eboss\n", + "\tmwm_yso_cmz\n", + "\tmwm_cb_gaiagalex\n", + "\tmanual_mwm_planet_known_apogee\n", + "\tmwm_wd_core\n", + "\topenfibertargets_nov2020_33\n", + "\tmanual_mwm_planet_harps_apogee\n", + "\tmwm_snc_ext_filler_boss\n", + "\tmanual_mwm_planet_transiting_bd_apogee\n", + "\tbhm_spiders_clusters_efeds_stragglers\n", + "\tops_apogee_stds\n", "\tmwm_rv_long-fps\n", - "\tmwm_halo_nmp_xp_boss\n", - "\tmanual_mwm_planet_sphere_apogee\n", + "\tmwm_yso_pms_apogee_sagitta_edr3_single\n", + "\tmanual_mwm_tess_ob\n", + "\tbhm_spiders_agn_ps1dr2\n", + "\tmwm_bin_vis_boss\n", "\tops_std_boss-red\n", - "\tmwm_yso_variable_boss\n", - "\tbhm_aqmes_med_faint\n", - "\tmanual_mwm_planet_tess_pc_apogee\n", - "\topenfibertargets_nov2020_27\n", - "\tmwm_magcloud_rgb_boss\n", - "\tbhm_spiders_agn_gaiadr3\n", - "\tmanual_mwm_planet_transiting_bd_apogee\n", - "\tmwm_cb_uvex4\n", - "\tmwm_yso_variable_apogee_single\n", - "\tmwm_halo_vmp_xp_apogee\n", - "\tmanual_mwm_halo_distant_kgiant_far_boss_single\n", - "\tmwm_bin_rv_short_mdwarf_apogee_18epoch\n", - "\tmanual_mwm_planet_sophie_apogee\n", - "\topenfibertargets_nov2020_33\n", - "\topenfibertargets_nov2020_12\n", + "\tbhm_spiders_agn_gaiadr2\n", + "\tmanual_offset_mwmhalo_off05\n", + "\tmwm_snc_ext_filler_apogee\n", + "\tbhm_aqmes_bonus_bright\n", + "\tmanual_mwm_magcloud_massive_boss\n", "\tmwm_bin_gaia_astb_apogee\n", - "\tmwm_legacy_ir2opt_boss\n", - "\tmanual_mwm_halo_mp_wise_apogee_single\n", - "\tmwm_monitor_m15_apogee_long\n", - "\tmwm_yso_nebula_apogee_single\n", - "\topenfibertargets_nov2020_25\n", - "\tmwm_planet_tess\n", - "\tbhm_aqmes_bonus_core\n", - "\tmwm_yso_ob_apogee\n", - "\tmwm_ob_cepheids\n", - "\topenfibertargets_nov2020_35a\n", + "\topenfibertargets_nov2020_30\n", + "\tmwm_bin_rv_short_rgb_apogee\n", + "\tops_std_boss_gdr2\n", + "\topenfibertargets_nov2020_47a\n", + "\tbhm_spiders_clusters_lsdr10\n", + "\tops_std_boss_ps1dr2\n", "\tmanual_mwm_crosscalib_yso_boss\n", - "\tmwm_cb_uvex2\n", - "\tmwm_monitor_m67_apogee_short\n", - "\topenfibertargets_nov2020_11\n", - "\tmwm_wd_pwd_boss\n", - "\tmanual_mwm_halo_vmp_wise_apogee\n", - "\tmanual_mwm_validation_cool_boss\n", - "\tmwm_galactic_core_dist_apogee\n", - "\tmanual_mwm_halo_vmp_wise_apogee_single\n", - "\tbhm_aqmes_bonus_faint\n", - "\topenfibertargets_nov2020_35c\n", - "\topenfibertargets_nov2020_6b\n", - "\tbhm_aqmes_wide3-faint\n", - "\topenfibertargets_nov2020_19a\n", + "\tmwm_snc_250pc_apogee\n", + "\tmanual_mwm_halo_distant_kgiant_far_boss_single\n", + "\tmwm_yso_pms_apogee_zari18pms\n", + "\tmwm_halo_vmp_xp_boss_single\n", + "\tmwm_halo_local_high_apogee\n", "\tbhm_spiders_agn_efeds_stragglers\n", - "\tmwm_cb_cvcandidates_apogee\n", - "\tbhm_spiders_agn_ps1dr2\n", - "\tmanual_mwm_crosscalib_yso_apogee\n", - "\tmwm_halo_nmp_xp_apogee_single\n", - "\tbhm_spiders_agn_supercosmos\n", - "\tmwm_yso_pms_boss_zari18pms\n", - "\tmanual_mwm_crosscalib_apogee\n", - "\tmwm_bin_vis_boss\n", - "\tmwm_bin_rv_short_mdwarf_apogee_12epoch\n", + "\tmanual_mwm_planet_tess_pc_apogee\n", + "\tbhm_csc_boss-bright\n", + "\tmwm_bin_rv_short_mdwarf_apogee_08epoch\n", "\tmwm_monitor_m15_apogee_short\n", - "\tmanual_offset_mwmhalo_off00\n", - "\tmwm_snc_100pc_boss\n", - "\tmwm_erosita_compact_boss_shallow\n", - "\tbhm_spiders_clusters-efeds-sdss-redmapper\n", - "\tops_std_boss\n", - "\tmwm_yso_cluster_boss\n", + "\tmwm_yso_pms_apogee_sagitta_edr3\n", + "\tmwm_rv_short-rm\n", + "\tmanual_bright_target_offsets_1\n", + "\tmwm_cb_300pc_apogee\n", + "\tmwm_halo_local_high_apogee_single\n", + "\tmwm_halo_mp_xp_apogee_single\n", + "\topenfibertargets_nov2020_31\n", + "\tbhm_gua_dark\n", + "\tbhm_aqmes_wide3\n", + "\topenfibertargets_nov2020_26\n", + "\tbhm_rm_known_spec\n", "\tbhm_spiders_agn_hard\n", - "\tmwm_yso_cmz\n", - "\topenfibertargets_nov2020_30\n", - "\tbhm_gua_bright\n", - "\tmwm_rv_long_fps\n", + "\tmwm_yso_cmz_apogee_single\n", + "\topenfibertargets_nov2020_1001b\n", + "\tmwm_bin_gaia_sb_boss\n", + "\tmwm_halo_nmp_xp_boss\n", + "\tmwm_legacy_ir2opt_boss\n", + "\tbhm_spiders_clusters_lsdr8\n", + "\tmwm_yso_pms_boss\n", + "\tmwm_yso_ob_apogee\n", "\tops_std_boss_red\n", - "\tmanual_offset_mwmhalo_off20\n", - "\tmwm_ob_core\n", - "\tbhm_spiders_clusters_efeds_stragglers\n", - "\tmwm_yso_cluster_apogee_single\n", - "\tmwm_erosita_compact_gen\n", - "\tmwm_halo_sm\n", - "\tmwm_wd_core\n", - "\tbhm_spiders_agn_lsdr8\n", - "\tmanual_mwm_halo_vmp_wise_boss_single\n", - "\tmwm_bin_rv_short_mdwarf_apogee_08epoch\n", - "\tmanual_bright_targets_g13\n", - "\tmanual_mwm_halo_distant_bhb_boss_single\n", + "\tmwm_halo_local_low_apogee_single\n", + "\tmwm_halo_bb_boss\n", + "\tmanual_fps_position_stars_apogee_10\n", + "\topenfibertargets_nov2020_6a\n", + "\tops_std_apogee\n", + "\topenfibertargets_nov2020_25\n", + "\tmwm_erosita_compact_var\n", + "\tmwm_bin_rv_long_apogee\n", + "\tbhm_spiders_clusters-efeds-sdss-redmapper\n", + "\topenfibertargets_nov2020_28c\n", "\tmanual_bright_targets_g13_offset_fixed_3\n", - "\tmwm_rv_short-fps\n", - "\tmwm_yso_variable_apogee\n", - "\tmwm_cb_gaiagalex_apogee\n", "\tmanual_bright_targets_g13_offset_fixed_5\n", - "\tmwm_bin_rv_short_subgiant_apogee\n", - "\topenfibertargets_nov2020_1000\n", - "\tmwm_halo_local_high_apogee_single\n", - "\tmwm_halo_mp_xp_apogee\n", - "\tmanual_mwm_tess_ob\n", - "\tbhm_rm_known_spec\n", - "\tmanual_mwm_magcloud_symbiotic_apogee\n", - "\tbhm_csc_boss-dark\n", - "\tmanual_mwm_halo_distant_bhb_boss\n", - "\tmwm_halo_local_high_boss\n", - "\tmwm_tess_ob\n", - "\tbhm_aqmes_med-faint\n", + "\tmwm_rv_short_fps\n", + "\tmwm_cb_swiftuvot_boss\n", + "\tmwm_ob_core\n", + "\tmwm_dust_core_dist_apogee\n", + "\tmwm_gg_core\n", + "\tbhm_spiders_clusters-efeds-hsc-redmapper\n", + "\tmwm_rv_long-rm\n", + "\tops_std_boss_lsdr10\n", + "\tmwm_halo_nmp_xp_boss_single\n", + "\topenfibertargets_nov2020_6c\n", + "\tmwm_magcloud_agb_apogee\n", + "\tmwm_ob_cepheids_boss\n", + "\tmwm_yso_variable_boss\n", + "\tmanual_mwm_halo_distant_kgiant_near_boss\n", + "\tmwm_bin_gaia_astb_boss\n", + "\tbhm_spiders_agn_lsdr8\n", + "\tmwm_ob_core_boss_single\n", + "\tbhm_aqmes_wide2\n", + "\topenfibertargets_nov2020_17\n", + "\tbhm_spiders_clusters-efeds-erosita\n", + "\tops_sky_apogee_good\n", + "\topenfibertargets_nov2020_18\n", + "\tmanual_fps_position_stars_lco_apogee_10\n", + "\tbhm_aqmes_med_faint\n", + "\topenfibertargets_nov2020_11\n", + "\tmwm_rv_short-bplates\n", + "\tmanual_mwm_magcloud_massive_apogee\n", + "\tmanual_mwm_validation_cool_boss\n", + "\tmwm_monitor_n188_apogee_long\n", "Alternative cartons names\n", - "\tmwm_dust_core\n", - "\tmanual_mwm_planet_sophie\n", - "\tmwm_bin_rv_short_rgb\n", - "\tmwm_openfiber\n", + "\tmwm_monitor_apogee_n188\n", + "\tmwm_halo_sm\n", + "\tmwm_bin_rv_long\n", "\tmanual_mwm_planet_tess_pc\n", - "\tmwm_monitor_apogee_m67\n", - "\tmwm_bin_rv_short\n", - "\tops_std\n", - "\tmwm_validation_hot\n", - "\tmwm_ob_cepheids\n", - "\tmwm_magcloud_symbiotic\n", - "\tmwm_halo_local\n", - "\tmanual_mwm_halo_distant_bhb\n", - "\tmwm_magcloud_agb\n", - "\tmanual_mwm_planet_tess_eb\n", + "\tmwm_validation_openfiber\n", + "\tmwm_tess_rgb\n", "\tmwm_bin_rv_short_subgiant\n", - "\tmwm_erosita_stars\n", - "\tmwm_wd\n", - "\tbhm_aqmes\n", - "\tmwm_yso_nebula\n", - "\tmanual_mwm_planet_known\n", - "\tmwm_magcloud_massive\n", - "\tmwm_yso_ob\n", + "\tmwm_bin_rv_short\n", "\tmwm_bin_vis\n", - "\tmwm_legacy_ir2opt\n", - "\tmwm_crosscalib_yso\n", - "\tmanual_mwm_planet_transiting_bd\n", - "\tmwm_halo_openfiber\n", - "\tmwm_snc\n", + "\tmanual_mwm_planet_ca_legacy\n", + "\tmanual_fps_position_stars_apogee\n", + "\tmwm_bin_openfiber\n", + "\tmwm_yso_nebula\n", + "\tmwm_dust_core\n", + "\tmanual_mwm_halo_distant_bhb\n", + "\tmanual_mwm_halo_mp_wise\n", + "\tmwm_validation_hot\n", + "\tmanual_mwm_nsbh\n", + "\tmanual_mwm_planet_sphere\n", + "\tmwm_ob_cepheids\n", + "\tmwm_openfiber\n", "\tmwm_bin_gaia_sb\n", + "\tmwm_validation_rv\n", + "\tbhm_csc\n", + "\tmanual_mwm_planet_gpi\n", + "\tmwm_magcloud_agb\n", + "\tmwm_cb_cvcandidates\n", + "\tmwm_cluster_openfiber\n", + "\tmwm_crosscalib_yso\n", + "\tmanual_mwm_planet_sophie\n", "\tmwm_yso_embedded\n", - "\tmanual_mwm_nsbh\n", - "\tmanual_mwm_planet_gaia_astrometry\n", - "\tmwm_yso_disk\n", - "\tops_sky\n", - "\tmwm_yso_pms\n", - "\tmanual_offset_mwmhalo\n", + "\tmwm_bin_gaia_astb\n", + "\tmwm_bin_rv_short_rgb\n", "\tmwm_erosita_compact\n", - "\tmwm_validation_openfiber\n", - "\tmwm_galactic_core\n", - "\tmwm_cb_swiftuvot\n", - "\tmwm_snc_openfiber\n", - "\tmwm_yso_cmz\n", - "\tmwm_halo_bb\n", + "\tmwm_yso_pms\n", + "\tmwm_erosita_stars\n", + "\tmanual_mwm_halo_distant_kgiant\n", + "\tmwm_yso_cluster\n", + "\tmwm_magcloud_massive\n", "\tmwm_crosscalib\n", + "\tmwm_cb_xmmom\n", + "\tmwm_cb_300pc\n", + "\tmwm_halo_bb\n", + "\tmwm_snc_openfiber\n", + "\tmwm_halo_local\n", + "\tmwm_magcloud_rgb\n", + "\tops_sky\n", + "\tmwm_magcloud_symbiotic\n", + "\tops_std\n", + "\tmwm_cb_swiftuvot\n", + "\tmwm_ob_core\n", + "\tmwm_yso_ob\n", + "\tmwm_halo_openfiber\n", "\tmwm_yso_variable\n", + "\tmwm_legacy_ir2opt\n", + "\tmwm_wd\n", + "\tmanual_mwm_planet_known\n", "\tmwm_monitor_apogee_m15\n", - "\tmwm_ob_core\n", - "\tmwm_tess_2min\n", - "\tmwm_halo_sm\n", - "\tmwm_cb_300pc\n", - "\tmwm_tess_rgb\n", + "\tmwm_yso_cmz\n", + "\tmwm_snc\n", + "\tmanual_offset_mwmhalo\n", + "\tbhm_filler\n", + "\tmwm_tess_ob\n", + "\tmanual_mwm_planet_gaia_astrometry\n", + "\tmwm_validation_cool\n", + "\tmanual_mwm_planet_transiting_bd\n", + "\tmwm_monitor_apogee_m67\n", "\tbhm_openfiber\n", - "\tmwm_bin_openfiber\n", + "\tmwm_cb_galex\n", + "\tmwm_halo_mp_xp\n", "\tbhm_spiders\n", - "\tmanual_mwm_halo_distant_kgiant\n", + "\tbhm_aqmes\n", + "\tmanual_mwm_planet_tess_eb\n", + "\tmwm_yso_disk\n", "\tmwm_bin_rv_short_mdwarf\n", - "\tmwm_bin_gaia_astb\n", - "\tmwm_validation_cool\n", "\tmwm_halo_distant_rrl\n", - "\tmanual_mwm_planet_gpi\n", - "\tmwm_cb_galex\n", - "\tmanual_mwm_planet_ca_legacy\n", - "\tmwm_cb_cvcandidates\n", - "\tmanual_fps_position_stars_apogee\n", - "\tmwm_yso_cluster\n", - "\tmanual_mwm_planet_sphere\n", - "\tbhm_filler\n", - "\tmwm_bin_rv_long\n", - "\tmwm_monitor_apogee_n188\n", - "\tmwm_halo_mp_xp\n", - "\tbhm_csc\n", - "\tbhm_rm\n", - "\tmwm_cb_xmmom\n", - "\tmwm_magcloud_rgb\n", - "\tmanual_mwm_halo_mp_wise\n", - "\tmwm_validation_rv\n", "\tmanual_mwm_planet_harps\n", - "\tmwm_tess_ob\n", - "\tmwm_cluster_openfiber\n", + "\tbhm_rm\n", + "\tmwm_tess_2min\n", + "\tmwm_galactic_core\n", "Alternative programs\n", - "\terosita\n", - "\tcsc\n", - "\tob\n", - "\tsky\n", - "\topen_fiber\n", + "\tcb\n", "\ttessob\n", - "\tsnc\n", - "\twd\n", - "\tmonitor\n", - "\tstd\n", - "\tspiders\n", + "\tvalidation\n", + "\ttessrgb\n", "\tyso\n", "\tdust\n", - "\tcommissioning\n", - "\ttessrgb\n", + "\ttess\n", + "\tsnc\n", "\thalo\n", - "\tfiller\n", - "\trm\n", - "\taqmes\n", "\tmagcloud\n", - "\tlegacy\n", - "\tnsbh\n", - "\tvalidation\n", + "\terosita\n", + "\taqmes\n", + "\trm\n", + "\tmonitor\n", + "\tcsc\n", + "\tob\n", + "\topen_fiber\n", "\tgalactic\n", - "\ttess\n", - "\tcb\n", "\tbin\n", - "\tplanet\n" + "\tfiller\n", + "\twd\n", + "\tplanet\n", + "\tcommissioning\n", + "\tstd\n", + "\tsky\n", + "\tnsbh\n", + "\tlegacy\n", + "\tspiders\n" ] } ], @@ -1045,7 +1084,7 @@ " print(f\"\\t{name}\")\n", "\n", "print(\"Alternative cartons names\")\n", - "for alt_name in flags.all_alt_names:\n", + "for alt_name in flags.all_alt_carton_names:\n", " print(f\"\\t{alt_name}\")\n", "\n", "print(\"Alternative programs\")\n", @@ -1062,16 +1101,24 @@ }, { "cell_type": "code", - "execution_count": 8, - "metadata": {}, + "execution_count": 10, + "metadata": { + "execution": { + "iopub.execute_input": "2024-12-19T21:29:02.253174Z", + "iopub.status.busy": "2024-12-19T21:29:02.252734Z", + "iopub.status.idle": "2024-12-19T21:29:04.324778Z", + "shell.execute_reply": "2024-12-19T21:29:04.324176Z", + "shell.execute_reply.started": "2024-12-19T21:29:02.253151Z" + } + }, "outputs": [ { "data": { "text/plain": [ - "array([ True, True, False, ..., False, False, False])" + "array([False, False, False, ..., True, True, False])" ] }, - "execution_count": 8, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -1084,8 +1131,16 @@ }, { "cell_type": "code", - "execution_count": 9, - "metadata": {}, + "execution_count": 11, + "metadata": { + "execution": { + "iopub.execute_input": "2024-12-19T21:29:04.326136Z", + "iopub.status.busy": "2024-12-19T21:29:04.325886Z", + "iopub.status.idle": "2024-12-19T21:29:04.329475Z", + "shell.execute_reply": "2024-12-19T21:29:04.328937Z", + "shell.execute_reply.started": "2024-12-19T21:29:04.326114Z" + } + }, "outputs": [], "source": [ "# The `mwm_mask` is a N-length boolean array, where N is the number of targets in the allStar file.\n", @@ -1094,14 +1149,22 @@ }, { "cell_type": "code", - "execution_count": 10, - "metadata": {}, + "execution_count": 12, + "metadata": { + "execution": { + "iopub.execute_input": "2024-12-19T21:29:05.709913Z", + "iopub.status.busy": "2024-12-19T21:29:05.709462Z", + "iopub.status.idle": "2024-12-19T21:29:07.767611Z", + "shell.execute_reply": "2024-12-19T21:29:07.766566Z", + "shell.execute_reply.started": "2024-12-19T21:29:05.709890Z" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "There are 340,581 things assigned to MWM\n" + "There are 340,583 things assigned to MWM\n" ] } ], @@ -1118,8 +1181,16 @@ }, { "cell_type": "code", - "execution_count": 11, - "metadata": {}, + "execution_count": 13, + "metadata": { + "execution": { + "iopub.execute_input": "2024-12-19T21:29:08.191932Z", + "iopub.status.busy": "2024-12-19T21:29:08.191501Z", + "iopub.status.idle": "2024-12-19T21:29:08.220754Z", + "shell.execute_reply": "2024-12-19T21:29:08.219895Z", + "shell.execute_reply.started": "2024-12-19T21:29:08.191906Z" + } + }, "outputs": [ { "data": { @@ -1127,7 +1198,7 @@ "array([False, False, False, ..., False, False, False])" ] }, - "execution_count": 11, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -1145,8 +1216,16 @@ }, { "cell_type": "code", - "execution_count": 12, - "metadata": {}, + "execution_count": 14, + "metadata": { + "execution": { + "iopub.execute_input": "2024-12-19T21:29:10.352466Z", + "iopub.status.busy": "2024-12-19T21:29:10.351743Z", + "iopub.status.idle": "2024-12-19T21:29:10.363743Z", + "shell.execute_reply": "2024-12-19T21:29:10.362873Z", + "shell.execute_reply.started": "2024-12-19T21:29:10.352443Z" + } + }, "outputs": [ { "data": { @@ -1154,7 +1233,7 @@ "array([False, False, False, ..., False, False, False])" ] }, - "execution_count": 12, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } @@ -1163,6 +1242,197 @@ "flags.in_carton_name(\"mwm_snc_250pc\")" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# I have a target, how was it targeted?\n", + "\n", + "If you have a CATALOGID or SDSS_ID and would like to know the targeting cartons for that source\n", + "\n", + "\n", + "The easiest way to do this is with the following methods:\n", + "\n", + "- `TargetingFlags.get_carton_pk`: returns a tuple of lists of carton_pk database primary key (`targetdb.carton.pk`), with 1 list per target\n", + "- `TargetingFlags.get_carton_name`: returns a tuple of lists of carton names, with 1 list per target\n", + "- `TargetingFlags.get_carton_label`: returns a tuple of lists of carton labels (name+version), with 1 list per target\n", + "- `TargetingFlags.get_mapper`: returns a tuple of lists of mapper, with 1 list per target\n", + "- `TargetingFlags.get_program`: returns a tuple of lists of programs, with 1 list per target\n", + "- `TargetingFlags.get_alt_name`: returns a tuple of lists of alternative carton names, with 1 list per target (curated with thanks by Marina Koukel)\n", + "- `TargetingFlags.get_alt_program`: returns a tuple of list of alternative program names, with 1 list per target (curated with thanks by Marina Koukel)\n", + "\n", + "They all have the same syntax, with an optional index element of type int, list of int, numpy array of ints\n", + "\n", + "----\n", + "If you have a CATALOGID or SDSS_ID and would like to know the targeting cartons for that source\n" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "execution": { + "iopub.execute_input": "2024-12-19T21:29:13.529506Z", + "iopub.status.busy": "2024-12-19T21:29:13.528905Z", + "iopub.status.idle": "2024-12-19T21:29:13.574721Z", + "shell.execute_reply": "2024-12-19T21:29:13.573796Z", + "shell.execute_reply.started": "2024-12-19T21:29:13.529482Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "index: 91676\n" + ] + }, + { + "data": { + "text/plain": [ + "(['mwm_yso_cluster_boss_0.5.0',\n", + " 'mwm_yso_cluster_apogee_0.5.17',\n", + " 'mwm_yso_cluster_boss_0.5.17',\n", + " 'mwm_yso_cluster_apogee_1.0.6',\n", + " 'mwm_yso_variable_apogee_1.0.6',\n", + " 'mwm_yso_variable_boss_single_1.0.33',\n", + " 'mwm_yso_cluster_boss_single_1.0.33'],)" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "catalogid = 27021598754184543\n", + "idx = np.where((image[1].data[\"CATALOGID21\"] == catalogid) |\n", + " (image[1].data[\"CATALOGID25\"] == catalogid) | \n", + " (image[1].data[\"CATALOGID31\"] == catalogid))[0][0]\n", + "print(f'index: {idx}')\n", + "flags.get_carton_label(index=idx)" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "execution": { + "iopub.execute_input": "2024-12-19T21:29:14.573519Z", + "iopub.status.busy": "2024-12-19T21:29:14.572836Z", + "iopub.status.idle": "2024-12-19T21:29:14.592970Z", + "shell.execute_reply": "2024-12-19T21:29:14.592081Z", + "shell.execute_reply.started": "2024-12-19T21:29:14.573491Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "index: 91676\n" + ] + }, + { + "data": { + "text/plain": [ + "(['mwm_yso_cluster_boss_0.5.0',\n", + " 'mwm_yso_cluster_apogee_0.5.17',\n", + " 'mwm_yso_cluster_boss_0.5.17',\n", + " 'mwm_yso_cluster_apogee_1.0.6',\n", + " 'mwm_yso_variable_apogee_1.0.6',\n", + " 'mwm_yso_variable_boss_single_1.0.33',\n", + " 'mwm_yso_cluster_boss_single_1.0.33'],)" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sdssid = 87406300\n", + "idx = np.where((image[1].data[\"SDSS_ID\"] == sdssid))[0][0]\n", + "print(f'index: {idx}')\n", + "flags.get_carton_label(index=idx)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "---\n", + "Similarly if you have a list of SDSS_IDs, you can supply a list or array or indexes" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "execution": { + "iopub.execute_input": "2024-12-19T21:29:16.131359Z", + "iopub.status.busy": "2024-12-19T21:29:16.130419Z", + "iopub.status.idle": "2024-12-19T21:29:16.155337Z", + "shell.execute_reply": "2024-12-19T21:29:16.154436Z", + "shell.execute_reply.started": "2024-12-19T21:29:16.131329Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "index: [91772 91773]\n" + ] + }, + { + "data": { + "text/plain": [ + "(['ops_std_boss_ps1dr2_0.5.0', 'ops_std_boss_ps1dr2_1.0.29'],\n", + " ['mwm_wd_core_0.5.0', 'mwm_wd_pwd_boss_1.0.42'])" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sdssids = [87508291, 87508257]\n", + "idx = np.where(np.isin(image[1].data[\"SDSS_ID\"], sdssids))[0]\n", + "print(f'index: {idx}')\n", + "flags.get_carton_label(index=idx)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "---\n", + "\n", + "Finally, you supply the default `None` value to get the source property for all the rows \n", + "\n", + "**Note if there a large number of rows, it will take a while to compute**" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "execution": { + "iopub.status.busy": "2024-12-19T21:27:22.602886Z", + "iopub.status.idle": "2024-12-19T21:27:22.603287Z", + "shell.execute_reply": "2024-12-19T21:27:22.603086Z", + "shell.execute_reply.started": "2024-12-19T21:27:22.603069Z" + } + }, + "outputs": [], + "source": [ + "mini_data = image[1].data[[1,2,3]]\n", + "flag1 = TargetingFlags(mini_data[\"SDSS5_TARGET_FLAGS\"])\n", + "flag1.get_carton_label()" + ] + }, { "cell_type": "code", "execution_count": null, @@ -1173,7 +1443,7 @@ ], "metadata": { "kernelspec": { - "display_name": "astra_base", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -1187,10 +1457,23 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.11.8" + }, + "scenes_data": { + "active_scene": "Default Scene", + "init_scene": "", + "scenes": [ + "Default Scene" + ] }, - "orig_nbformat": 4 + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "state": {}, + "version_major": 2, + "version_minor": 0 + } + } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/python/sdss_semaphore/__init__.py b/python/sdss_semaphore/__init__.py index 73dd9b9..6c036ae 100644 --- a/python/sdss_semaphore/__init__.py +++ b/python/sdss_semaphore/__init__.py @@ -199,6 +199,36 @@ def shrink(self): self.array = self.array[:, :index] return self + def get_attribute(self, key, index: Union[int, List[int], np.ndarray] = None) -> Tuple: + """ + Return a list of the set values for a key for a single target + + :param key: + The attribute key. + + :param index: + The index of the target in the Targeting Flag + + :returns: + A list of the requested attibute for the stet flags + """ + if index is None: + _flags = self + elif isinstance(index, (int, np.integer)): + # Single index case + _flags = self[index] + elif isinstance(index, (list, np.ndarray)): + _flags = [self[i] for i in index] + elif isinstance(index, np.ndarray): + _flags = [self[i] for i in index.tolist()] # Convert numpy array to list and index + else: + raise TypeError("Index must be an int, a list of ints, or a numpy array of ints.") + + return tuple([[d[key] for d in t_of_d if key in d] + for _flag in _flags for t_of_d in _flag.flags_set]) + + + def is_attribute_set(self, key, value) -> np.array: """ Return a N-length boolean array indicating whether the item has any flag with the given attribute. diff --git a/python/sdss_semaphore/targeting.py b/python/sdss_semaphore/targeting.py index 0bed9b4..34f6f99 100644 --- a/python/sdss_semaphore/targeting.py +++ b/python/sdss_semaphore/targeting.py @@ -1,7 +1,7 @@ import numpy as np -from typing import Union, Tuple, Iterable, Optional import os import warnings +from typing import Union, Tuple, Iterable, Optional from sdss_semaphore import BaseFlags, cached_class_property import importlib.resources as resources @@ -97,6 +97,90 @@ def in_alt_program(self, alt_program: str) -> np.array: """ return self.is_attribute_set("alt_program", alt_program) + def get_carton_pk(self, index: int = None) -> Tuple[str]: + """ + Returns the Tuple of list of carton pks for a target + If a list or numpy array of indices is provided, it returns a list of 1-element Tuples, + each matching the corresponding index. + + :param index: + The index of the Target in the TargetingFlag array + """ + return self.get_attribute("carton_pk", index) + + def get_carton_label(self, index: Union[int, List[int], np.ndarray] = None) -> Tuple[str]: + """ + Returns the Tuple of list of carton cables for a target + If an index is provided it returns a 1-element Tuple matching that index + If a list or numpy array of indices is provided, it returns a list of 1-element Tuples, + each matching the corresponding index. + + :param index: + The index or indices of the Target in the TargetingFlag array + """ + + return self.get_attribute("label", index) + + def get_carton_name(self, index: int = None) -> Tuple[str]: + """ + Returns the Tuple of list of cartons names for a target + If an index is provided it returns a 1-element Tuple matching that index + If a list or numpy array of indices is provided, it returns a list of 1-element Tuples, + each matching the corresponding index. + + :param index: + The index of the Target in the TargetingFlag array + """ + return self.get_attribute("name", index) + + def get_mapper(self, index: int = None) -> Tuple[str]: + """ + Returns the Tuple of list of mappers for a target + If an index is provided it returns a 1-element Tuple matching that index + If a list or numpy array of indices is provided, it returns a list of 1-element Tuples, + each matching the corresponding index. + + :param index: + The index of the Target in the TargetingFlag array + """ + return self.get_attribute("mapper", index) + + def get_program(self, index: int = None) -> Tuple[str]: + """ + Returns the Tuple of list of alt_program for a target + If an index is provided it returns a 1-element Tuple matching that index + If a list or numpy array of indices is provided, it returns a list of 1-element Tuples, + each matching the corresponding index. + + :param index: + The index of the Target in the TargetingFlag array + """ + return self.get_attribute("program", index) + + def get_alt_name(self, index: int = None) -> Tuple[str]: + """ + Returns the Tuple of list of alt_name for a target + If an index is provided it returns a 1-element Tuple matching that index + If a list or numpy array of indices is provided, it returns a list of 1-element Tuples, + each matching the corresponding index. + + :param index: + The index of the Target in the TargetingFlag array + """ + return self.get_attribute("alt_name", index) + + def get_alt_program(self, index: int = None) -> Tuple[str]: + """ + Returns the Tuple of list of alt_program for a target + If an index is provided it returns a 1-element Tuple matching that index + If a list or numpy array of indices is provided, it returns a list of 1-element Tuples, + each matching the corresponding index. + + :param index: + The index of the Target in the TargetingFlag array + """ + return self.get_attribute("alt_name", index) + def count(self, skip_empty: bool = False) -> dict: """ Return a dictionary containing the number of items assigned by each carton label.