rubin-sim 2.6.1.dev2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- batch/compile_prenight_metadata_cache.sh +34 -0
- batch/run_auxtel_prenight_sims.sh +163 -0
- batch/run_prenight_sims.sh +239 -0
- docs/.gitignore +3 -0
- docs/Makefile +32 -0
- docs/api.rst +25 -0
- docs/conf.py +8 -0
- docs/data-api.rst +12 -0
- docs/data-download.rst +70 -0
- docs/developer.rst +14 -0
- docs/documenteer.toml +11 -0
- docs/index.rst +22 -0
- docs/installation.rst +76 -0
- docs/introduction.rst +37 -0
- docs/maf-api-batches.rst +12 -0
- docs/maf-api-db.rst +12 -0
- docs/maf-api-maf-contrib.rst +12 -0
- docs/maf-api-maps.rst +12 -0
- docs/maf-api-metricbundles.rst +12 -0
- docs/maf-api-metrics.rst +12 -0
- docs/maf-api-plots.rst +12 -0
- docs/maf-api-run-comparison.rst +12 -0
- docs/maf-api-slicers.rst +12 -0
- docs/maf-api-stackers.rst +12 -0
- docs/maf-api-utils.rst +12 -0
- docs/maf-api.rst +22 -0
- docs/maf.rst +60 -0
- docs/metric_list.py +49 -0
- docs/moving-objects-api.rst +12 -0
- docs/moving-objects.rst +22 -0
- docs/phot-utils-api.rst +12 -0
- docs/phot-utils.rst +11 -0
- docs/prenight.rst +117 -0
- docs/protoarchive.rst +276 -0
- docs/satellite-constellations-api.rst +12 -0
- docs/satellite-constellations.rst +13 -0
- docs/selfcal-api.rst +12 -0
- docs/selfcal.rst +15 -0
- docs/sim-archive-api.rst +12 -0
- docs/skybrightness-api.rst +12 -0
- docs/skybrightness.rst +23 -0
- docs/user-guide.rst +28 -0
- docs/vseqarchive-architecture.rst +438 -0
- docs/vseqarchive-setup.rst +238 -0
- docs/vseqarchive.rst +225 -0
- rubin_sim/__init__.py +7 -0
- rubin_sim/data/__init__.py +1 -0
- rubin_sim/data/rs_download_data.py +155 -0
- rubin_sim/maf/__init__.py +34 -0
- rubin_sim/maf/batches/__init__.py +18 -0
- rubin_sim/maf/batches/altaz_batch.py +161 -0
- rubin_sim/maf/batches/col_map_dict.py +274 -0
- rubin_sim/maf/batches/common.py +388 -0
- rubin_sim/maf/batches/ddf_batch.py +728 -0
- rubin_sim/maf/batches/filterchange_batch.py +182 -0
- rubin_sim/maf/batches/glance_batch.py +591 -0
- rubin_sim/maf/batches/hourglass_batch.py +79 -0
- rubin_sim/maf/batches/info_batch.py +114 -0
- rubin_sim/maf/batches/metadata_batch.py +558 -0
- rubin_sim/maf/batches/moving_objects_batch.py +1587 -0
- rubin_sim/maf/batches/openshutter_batch.py +100 -0
- rubin_sim/maf/batches/radar_limited.py +1100 -0
- rubin_sim/maf/batches/science_radar_batch.py +1910 -0
- rubin_sim/maf/batches/skycoverage.py +155 -0
- rubin_sim/maf/batches/slew_batch.py +146 -0
- rubin_sim/maf/batches/srd_batch.py +637 -0
- rubin_sim/maf/batches/time_batch.py +757 -0
- rubin_sim/maf/batches/time_sci_batch.py +105 -0
- rubin_sim/maf/batches/visitdepth_batch.py +485 -0
- rubin_sim/maf/db/__init__.py +2 -0
- rubin_sim/maf/db/add_run.py +34 -0
- rubin_sim/maf/db/results_db.py +1074 -0
- rubin_sim/maf/db/tracking_db.py +332 -0
- rubin_sim/maf/ddf_dir.py +53 -0
- rubin_sim/maf/generate_ss.py +218 -0
- rubin_sim/maf/glance_dir.py +58 -0
- rubin_sim/maf/maf_contrib/__init__.py +25 -0
- rubin_sim/maf/maf_contrib/calculate_lsst_field_visibility_astropy.py +170 -0
- rubin_sim/maf/maf_contrib/depth_limited_num_gal_metric.py +109 -0
- rubin_sim/maf/maf_contrib/example_new_metrics.py +40 -0
- rubin_sim/maf/maf_contrib/filter_pair_t_gaps_metric.py +208 -0
- rubin_sim/maf/maf_contrib/grb_transient_metric.py +249 -0
- rubin_sim/maf/maf_contrib/gw170817_det_metric.py +72 -0
- rubin_sim/maf/maf_contrib/intervals_between_obs_metric.py +68 -0
- rubin_sim/maf/maf_contrib/kne_metrics.py +473 -0
- rubin_sim/maf/maf_contrib/lss_metrics.py +45 -0
- rubin_sim/maf/maf_contrib/lss_obs_strategy/__init__.py +3 -0
- rubin_sim/maf/maf_contrib/lss_obs_strategy/constants_for_pipeline.py +73 -0
- rubin_sim/maf/maf_contrib/lss_obs_strategy/galaxy_counts_metric_extended.py +205 -0
- rubin_sim/maf/maf_contrib/lss_obs_strategy/galaxy_counts_with_pixel_calibration.py +171 -0
- rubin_sim/maf/maf_contrib/lv_dwarfs/__init__.py +1 -0
- rubin_sim/maf/maf_contrib/lv_dwarfs/lv_dwarfs_metrics.py +388 -0
- rubin_sim/maf/maf_contrib/microlensing_metric.py +593 -0
- rubin_sim/maf/maf_contrib/num_obs_in_survey_time_overlap_metric.py +43 -0
- rubin_sim/maf/maf_contrib/periodic_metric.py +51 -0
- rubin_sim/maf/maf_contrib/periodic_star_metric.py +186 -0
- rubin_sim/maf/maf_contrib/periodic_star_modulation_metric.py +236 -0
- rubin_sim/maf/maf_contrib/presto_color_kne_pop_metric.py +441 -0
- rubin_sim/maf/maf_contrib/selfcal_uniformity_metric.py +171 -0
- rubin_sim/maf/maf_contrib/star_count_mass_metric.py +64 -0
- rubin_sim/maf/maf_contrib/star_count_metric.py +56 -0
- rubin_sim/maf/maf_contrib/star_counts/__init__.py +8 -0
- rubin_sim/maf/maf_contrib/star_counts/abs_mag.py +324 -0
- rubin_sim/maf/maf_contrib/star_counts/coords.py +99 -0
- rubin_sim/maf/maf_contrib/star_counts/readme.txt +1 -0
- rubin_sim/maf/maf_contrib/star_counts/spec_type.py +91 -0
- rubin_sim/maf/maf_contrib/star_counts/starcount.py +30 -0
- rubin_sim/maf/maf_contrib/star_counts/starcount_bymass.py +93 -0
- rubin_sim/maf/maf_contrib/star_counts/stellardensity.py +59 -0
- rubin_sim/maf/maf_contrib/static_probes_fom_summary_metric.py +386 -0
- rubin_sim/maf/maf_contrib/tdes_pop_metric.py +362 -0
- rubin_sim/maf/maf_contrib/transient_ascii_sed_metric.py +652 -0
- rubin_sim/maf/maf_contrib/triplet_metric.py +156 -0
- rubin_sim/maf/maf_contrib/var_depth_metric.py +157 -0
- rubin_sim/maf/maf_contrib/xrb_metrics.py +523 -0
- rubin_sim/maf/maf_contrib/young_stellar_objects_metric.py +200 -0
- rubin_sim/maf/maf_night_report.py +200 -0
- rubin_sim/maf/make_fbs_tracking_db.py +90 -0
- rubin_sim/maf/maps/__init__.py +8 -0
- rubin_sim/maf/maps/base_map.py +72 -0
- rubin_sim/maf/maps/create_gaia_density_map.py +158 -0
- rubin_sim/maf/maps/dust_map.py +66 -0
- rubin_sim/maf/maps/dust_map_3d.py +190 -0
- rubin_sim/maf/maps/ebv_3d_hp.py +170 -0
- rubin_sim/maf/maps/ebv_hp.py +64 -0
- rubin_sim/maf/maps/gal_coords_map.py +22 -0
- rubin_sim/maf/maps/galactic_plane_priority_maps.py +210 -0
- rubin_sim/maf/maps/stellar_density_map.py +73 -0
- rubin_sim/maf/maps/trilegal_map.py +82 -0
- rubin_sim/maf/metadata_dir.py +90 -0
- rubin_sim/maf/metric_bundles/__init__.py +3 -0
- rubin_sim/maf/metric_bundles/metric_bundle.py +816 -0
- rubin_sim/maf/metric_bundles/metric_bundle_group.py +834 -0
- rubin_sim/maf/metric_bundles/mo_metric_bundle.py +646 -0
- rubin_sim/maf/metrics/__init__.py +52 -0
- rubin_sim/maf/metrics/agn_time_lag_metric.py +118 -0
- rubin_sim/maf/metrics/agnstructure.py +141 -0
- rubin_sim/maf/metrics/area_summary_metrics.py +120 -0
- rubin_sim/maf/metrics/base_metric.py +215 -0
- rubin_sim/maf/metrics/brown_dwarf_metric.py +162 -0
- rubin_sim/maf/metrics/cadence_metrics.py +400 -0
- rubin_sim/maf/metrics/calibration_metrics.py +618 -0
- rubin_sim/maf/metrics/chip_vendor_metric.py +43 -0
- rubin_sim/maf/metrics/color_slope_metrics.py +189 -0
- rubin_sim/maf/metrics/cosmology_summary_metrics.py +1212 -0
- rubin_sim/maf/metrics/coverage_metric.py +48 -0
- rubin_sim/maf/metrics/crowding_metric.py +255 -0
- rubin_sim/maf/metrics/cumulative_metric.py +46 -0
- rubin_sim/maf/metrics/dcr_metric.py +93 -0
- rubin_sim/maf/metrics/exgal_m5.py +57 -0
- rubin_sim/maf/metrics/fft_metric.py +27 -0
- rubin_sim/maf/metrics/galactic_plane_metrics.py +375 -0
- rubin_sim/maf/metrics/galplane_time_sampling_metrics.py +236 -0
- rubin_sim/maf/metrics/hourglass_metric.py +130 -0
- rubin_sim/maf/metrics/incremental_template_metric.py +255 -0
- rubin_sim/maf/metrics/kuiper_metrics.py +26 -0
- rubin_sim/maf/metrics/mo_metrics.py +1496 -0
- rubin_sim/maf/metrics/mo_summary_metrics.py +464 -0
- rubin_sim/maf/metrics/night_pointing_metric.py +70 -0
- rubin_sim/maf/metrics/optimal_m5_metric.py +94 -0
- rubin_sim/maf/metrics/pair_metric.py +69 -0
- rubin_sim/maf/metrics/periodic_detect_metric.py +133 -0
- rubin_sim/maf/metrics/phase_gap_metric.py +172 -0
- rubin_sim/maf/metrics/qso_number_counts_metric.py +138 -0
- rubin_sim/maf/metrics/scaling_metrics.py +148 -0
- rubin_sim/maf/metrics/schedview_metrics.py +39 -0
- rubin_sim/maf/metrics/season_metrics.py +344 -0
- rubin_sim/maf/metrics/simple_metrics.py +546 -0
- rubin_sim/maf/metrics/sky_sat_metric.py +18 -0
- rubin_sim/maf/metrics/sn_cadence_metric.py +104 -0
- rubin_sim/maf/metrics/sn_n_sn_metric.py +1364 -0
- rubin_sim/maf/metrics/sn_sl_metric.py +216 -0
- rubin_sim/maf/metrics/sn_snr_metric.py +715 -0
- rubin_sim/maf/metrics/snr_weight.py +24 -0
- rubin_sim/maf/metrics/star_density.py +77 -0
- rubin_sim/maf/metrics/string_count_metric.py +95 -0
- rubin_sim/maf/metrics/summary_metrics.py +201 -0
- rubin_sim/maf/metrics/surfb_metric.py +175 -0
- rubin_sim/maf/metrics/technical_metrics.py +271 -0
- rubin_sim/maf/metrics/tgaps.py +412 -0
- rubin_sim/maf/metrics/tomography_models.py +2034 -0
- rubin_sim/maf/metrics/transient_metrics.py +268 -0
- rubin_sim/maf/metrics/uniformity_metrics.py +418 -0
- rubin_sim/maf/metrics/use_metrics.py +55 -0
- rubin_sim/maf/metrics/vector_metrics.py +190 -0
- rubin_sim/maf/metrics/visit_groups_metric.py +341 -0
- rubin_sim/maf/metrics/weak_lensing_systematics_metric.py +210 -0
- rubin_sim/maf/plots/__init__.py +14 -0
- rubin_sim/maf/plots/hg_plotters.py +1117 -0
- rubin_sim/maf/plots/hourglass_plotters.py +120 -0
- rubin_sim/maf/plots/mo_plotters.py +358 -0
- rubin_sim/maf/plots/nd_plotters.py +220 -0
- rubin_sim/maf/plots/neo_distance_plotter.py +140 -0
- rubin_sim/maf/plots/night_pointing_plotter.py +96 -0
- rubin_sim/maf/plots/oned_plotters.py +114 -0
- rubin_sim/maf/plots/perceptual_rainbow.py +30 -0
- rubin_sim/maf/plots/plot_handler.py +766 -0
- rubin_sim/maf/plots/skyproj_plotters.py +540 -0
- rubin_sim/maf/plots/spatial_plotters.py +1029 -0
- rubin_sim/maf/plots/special_plotters.py +256 -0
- rubin_sim/maf/plots/two_d_plotters.py +177 -0
- rubin_sim/maf/plots/xyplotter.py +37 -0
- rubin_sim/maf/run_comparison/__init__.py +5 -0
- rubin_sim/maf/run_comparison/archive.py +584 -0
- rubin_sim/maf/run_comparison/gather_summaries.py +125 -0
- rubin_sim/maf/run_comparison/microlensing_compare.py +514 -0
- rubin_sim/maf/run_comparison/radar_plot.py +202 -0
- rubin_sim/maf/run_comparison/summary_plots.py +710 -0
- rubin_sim/maf/run_moving_calc.py +239 -0
- rubin_sim/maf/run_moving_fractions.py +128 -0
- rubin_sim/maf/run_moving_join.py +103 -0
- rubin_sim/maf/run_selfcal_metric.py +92 -0
- rubin_sim/maf/scimaf_dir.py +87 -0
- rubin_sim/maf/show_maf.py +227 -0
- rubin_sim/maf/slicers/__init__.py +13 -0
- rubin_sim/maf/slicers/base_slicer.py +513 -0
- rubin_sim/maf/slicers/base_spatial_slicer.py +202 -0
- rubin_sim/maf/slicers/healpix_sdss_slicer.py +118 -0
- rubin_sim/maf/slicers/healpix_slicer.py +189 -0
- rubin_sim/maf/slicers/healpix_subset_slicer.py +293 -0
- rubin_sim/maf/slicers/hourglass_slicer.py +37 -0
- rubin_sim/maf/slicers/mo_slicer.py +171 -0
- rubin_sim/maf/slicers/movie_slicer.py +288 -0
- rubin_sim/maf/slicers/nd_slicer.py +147 -0
- rubin_sim/maf/slicers/one_d_slicer.py +210 -0
- rubin_sim/maf/slicers/time_interval_slicers.py +283 -0
- rubin_sim/maf/slicers/uni_slicer.py +57 -0
- rubin_sim/maf/slicers/user_points_slicer.py +141 -0
- rubin_sim/maf/stackers/__init__.py +13 -0
- rubin_sim/maf/stackers/base_stacker.py +221 -0
- rubin_sim/maf/stackers/coord_stackers.py +224 -0
- rubin_sim/maf/stackers/date_stackers.py +192 -0
- rubin_sim/maf/stackers/general_stackers.py +683 -0
- rubin_sim/maf/stackers/get_col_info.py +104 -0
- rubin_sim/maf/stackers/label_stackers.py +114 -0
- rubin_sim/maf/stackers/m5_optimal_stacker.py +126 -0
- rubin_sim/maf/stackers/mo_phase.py +265 -0
- rubin_sim/maf/stackers/mo_stackers.py +486 -0
- rubin_sim/maf/stackers/n_follow_stacker.py +187 -0
- rubin_sim/maf/stackers/neo_dist_stacker.py +126 -0
- rubin_sim/maf/stackers/sdss_stackers.py +30 -0
- rubin_sim/maf/stackers/sn_stacker.py +152 -0
- rubin_sim/maf/stackers/teff_stacker.py +154 -0
- rubin_sim/maf/utils/__init__.py +6 -0
- rubin_sim/maf/utils/astrometry_utils.py +93 -0
- rubin_sim/maf/utils/generate_fov_map.py +58 -0
- rubin_sim/maf/utils/get_date_version.py +28 -0
- rubin_sim/maf/utils/maf_utils.py +212 -0
- rubin_sim/maf/utils/opsim_utils.py +259 -0
- rubin_sim/maf/utils/output_utils.py +34 -0
- rubin_sim/maf/utils/sn_n_sn_utils.py +894 -0
- rubin_sim/maf/utils/sn_utils.py +369 -0
- rubin_sim/maf/utils/stellar_mags.py +197 -0
- rubin_sim/maf/web/__init__.py +2 -0
- rubin_sim/maf/web/favicon.ico +0 -0
- rubin_sim/maf/web/maf_run_results.py +645 -0
- rubin_sim/maf/web/maf_tracking.py +139 -0
- rubin_sim/maf/web/sorttable.js +496 -0
- rubin_sim/maf/web/templates/allmetricresults.html +72 -0
- rubin_sim/maf/web/templates/configs.html +28 -0
- rubin_sim/maf/web/templates/macros.html +243 -0
- rubin_sim/maf/web/templates/master.html +294 -0
- rubin_sim/maf/web/templates/metricselect.html +91 -0
- rubin_sim/maf/web/templates/multicolor.html +147 -0
- rubin_sim/maf/web/templates/results.html +82 -0
- rubin_sim/maf/web/templates/runselect.html +58 -0
- rubin_sim/maf/web/templates/stats.html +50 -0
- rubin_sim/moving_objects/__init__.py +8 -0
- rubin_sim/moving_objects/base_obs.py +468 -0
- rubin_sim/moving_objects/cheby_fits.py +689 -0
- rubin_sim/moving_objects/cheby_values.py +231 -0
- rubin_sim/moving_objects/chebyshev_utils.py +365 -0
- rubin_sim/moving_objects/direct_obs.py +376 -0
- rubin_sim/moving_objects/make_lsst_obs.py +282 -0
- rubin_sim/moving_objects/ooephemerides.py +643 -0
- rubin_sim/moving_objects/orbits.py +507 -0
- rubin_sim/moving_objects/pre_generate.py +37 -0
- rubin_sim/moving_objects/utils.py +61 -0
- rubin_sim/phot_utils/__init__.py +7 -0
- rubin_sim/phot_utils/bandpass.py +425 -0
- rubin_sim/phot_utils/photometric_parameters.py +449 -0
- rubin_sim/phot_utils/physical_parameters.py +50 -0
- rubin_sim/phot_utils/predicted_zeropoints.py +245 -0
- rubin_sim/phot_utils/sed.py +1773 -0
- rubin_sim/phot_utils/sed_utils.py +52 -0
- rubin_sim/phot_utils/signaltonoise.py +695 -0
- rubin_sim/phot_utils/spectral_resampling.py +161 -0
- rubin_sim/satellite_constellations/__init__.py +3 -0
- rubin_sim/satellite_constellations/basis_function.py +40 -0
- rubin_sim/satellite_constellations/model_observatory.py +157 -0
- rubin_sim/satellite_constellations/sat_utils.py +488 -0
- rubin_sim/selfcal/__init__.py +4 -0
- rubin_sim/selfcal/generate_catalog.py +188 -0
- rubin_sim/selfcal/offsets.py +119 -0
- rubin_sim/selfcal/solver.py +143 -0
- rubin_sim/selfcal/star_tools.py +42 -0
- rubin_sim/sim_archive/__init__.py +14 -0
- rubin_sim/sim_archive/conda_packages.py +65 -0
- rubin_sim/sim_archive/future_vsarch.py +480 -0
- rubin_sim/sim_archive/make_snapshot.py +255 -0
- rubin_sim/sim_archive/prenight.py +216 -0
- rubin_sim/sim_archive/prenightindex.py +229 -0
- rubin_sim/sim_archive/prototype.py +1029 -0
- rubin_sim/sim_archive/sim_archive.py +680 -0
- rubin_sim/sim_archive/tempdb.py +56 -0
- rubin_sim/sim_archive/util.py +146 -0
- rubin_sim/sim_archive/vseqarchive.py +965 -0
- rubin_sim/sim_archive/vseqmetadata.py +1721 -0
- rubin_sim/skybrightness/__init__.py +5 -0
- rubin_sim/skybrightness/allsky_db.py +93 -0
- rubin_sim/skybrightness/data/ESO_Spectra/eso_tools.py +505 -0
- rubin_sim/skybrightness/data/solarSpec/package.py +22 -0
- rubin_sim/skybrightness/generate_hdf5.py +243 -0
- rubin_sim/skybrightness/interp_components.py +798 -0
- rubin_sim/skybrightness/sky_model.py +771 -0
- rubin_sim/skybrightness/twilight_func.py +83 -0
- rubin_sim/skybrightness/utils.py +91 -0
- rubin_sim-2.6.1.dev2.dist-info/METADATA +95 -0
- rubin_sim-2.6.1.dev2.dist-info/RECORD +387 -0
- rubin_sim-2.6.1.dev2.dist-info/WHEEL +5 -0
- rubin_sim-2.6.1.dev2.dist-info/entry_points.txt +24 -0
- rubin_sim-2.6.1.dev2.dist-info/licenses/LICENSE +674 -0
- rubin_sim-2.6.1.dev2.dist-info/top_level.txt +5 -0
- sql/make_vseqmeta.sql +251 -0
- tests/data/test_data.py +26 -0
- tests/data/test_ddf_grid.py +17 -0
- tests/maf/test_3x2fom.py +68 -0
- tests/maf/test_archive.py +162 -0
- tests/maf/test_basemetrics.py +99 -0
- tests/maf/test_batchcommon.py +36 -0
- tests/maf/test_batches.py +159 -0
- tests/maf/test_cadencemetrics.py +388 -0
- tests/maf/test_calibrationmetrics.py +242 -0
- tests/maf/test_color_slopes.py +71 -0
- tests/maf/test_cosmology_summaries.py +20 -0
- tests/maf/test_gathersummaries.py +48 -0
- tests/maf/test_healpixslicer.py +439 -0
- tests/maf/test_healpixsubsetslicer.py +273 -0
- tests/maf/test_hgplotters.py +145 -0
- tests/maf/test_hourglassmetric.py +33 -0
- tests/maf/test_io.py +187 -0
- tests/maf/test_json.py +169 -0
- tests/maf/test_maps.py +199 -0
- tests/maf/test_metricbundle.py +69 -0
- tests/maf/test_mometrics.py +422 -0
- tests/maf/test_movieslicer.py +216 -0
- tests/maf/test_ndslicer.py +240 -0
- tests/maf/test_neodistanceplotter.py +41 -0
- tests/maf/test_onedslicer.py +245 -0
- tests/maf/test_opsimutils.py +80 -0
- tests/maf/test_plotters.py +134 -0
- tests/maf/test_resultsdb.py +145 -0
- tests/maf/test_schedviewmetrics.py +14 -0
- tests/maf/test_simplemetrics.py +200 -0
- tests/maf/test_snmetrics.py +335 -0
- tests/maf/test_snmetrics_nsn.py +123 -0
- tests/maf/test_stackers.py +423 -0
- tests/maf/test_stellarmags.py +50 -0
- tests/maf/test_stringcount.py +26 -0
- tests/maf/test_summary_plots.py +197 -0
- tests/maf/test_summarymetrics.py +82 -0
- tests/maf/test_technicalmetrics.py +267 -0
- tests/maf/test_templatemetrics.py +86 -0
- tests/maf/test_timeintervalslicers.py +97 -0
- tests/maf/test_trackingdb.py +88 -0
- tests/maf/test_unislicer.py +116 -0
- tests/maf/test_vectormetrics.py +225 -0
- tests/maf/test_visitgroupsmetric.py +181 -0
- tests/moving_objects/test_camera.py +39 -0
- tests/moving_objects/test_chebyfits.py +188 -0
- tests/moving_objects/test_chebyshevutils.py +76 -0
- tests/moving_objects/test_chebyvalues.py +245 -0
- tests/moving_objects/test_ephemerides.py +219 -0
- tests/moving_objects/test_orbits.py +170 -0
- tests/moving_objects/test_sed_data.py +61 -0
- tests/phot_utils/test_approximatebandpasses.py +91 -0
- tests/phot_utils/test_photometricparameters.py +268 -0
- tests/phot_utils/test_photometry.py +61 -0
- tests/phot_utils/test_predicted_zeropoints.py +53 -0
- tests/phot_utils/test_read_bandpasses.py +29 -0
- tests/phot_utils/test_sed.py +368 -0
- tests/phot_utils/test_snr.py +370 -0
- tests/satellite_constellations/test_satellites.py +36 -0
- tests/sim_archive/test_make_snapshot.py +24 -0
- tests/sim_archive/test_prototype_sim_archive.py +204 -0
- tests/sim_archive/test_vseqarchive.py +947 -0
- tests/skybrightness/test_skymodel.py +359 -0
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
__all__ = ("col_map_dict",)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def col_map_dict(dict_name=None):
|
|
5
|
+
if dict_name is None:
|
|
6
|
+
dict_name = "FBS"
|
|
7
|
+
dict_name = dict_name.lower()
|
|
8
|
+
|
|
9
|
+
if dict_name == "fbs":
|
|
10
|
+
col_map = {}
|
|
11
|
+
col_map["ra"] = "fieldRA"
|
|
12
|
+
col_map["dec"] = "fieldDec"
|
|
13
|
+
col_map["raDecDeg"] = True
|
|
14
|
+
col_map["mjd"] = "observationStartMJD"
|
|
15
|
+
col_map["exptime"] = "visitExposureTime"
|
|
16
|
+
col_map["visittime"] = "visitTime"
|
|
17
|
+
col_map["alt"] = "altitude"
|
|
18
|
+
col_map["az"] = "azimuth"
|
|
19
|
+
col_map["lst"] = "observationStartLST"
|
|
20
|
+
col_map["filter"] = "band"
|
|
21
|
+
col_map["band"] = "band"
|
|
22
|
+
col_map["fiveSigmaDepth"] = "fiveSigmaDepth"
|
|
23
|
+
col_map["night"] = "night"
|
|
24
|
+
col_map["slewtime"] = "slewTime"
|
|
25
|
+
col_map["slewdist"] = "slewDistance"
|
|
26
|
+
col_map["seeingEff"] = "seeingFwhmEff"
|
|
27
|
+
col_map["seeingGeom"] = "seeingFwhmGeom"
|
|
28
|
+
col_map["skyBrightness"] = "skyBrightness"
|
|
29
|
+
col_map["moonDistance"] = "moonDistance"
|
|
30
|
+
col_map["slewactivities"] = {}
|
|
31
|
+
col_map["metadataList"] = [
|
|
32
|
+
"airmass",
|
|
33
|
+
"normairmass",
|
|
34
|
+
"seeingEff",
|
|
35
|
+
"skyBrightness",
|
|
36
|
+
"fiveSigmaDepth",
|
|
37
|
+
"HA",
|
|
38
|
+
"moonDistance",
|
|
39
|
+
"solarElong",
|
|
40
|
+
"saturation_mag",
|
|
41
|
+
]
|
|
42
|
+
col_map["metadataAngleList"] = ["rotSkyPos"]
|
|
43
|
+
col_map["scheduler_note"] = "scheduler_note"
|
|
44
|
+
col_map["scheduler_note_root"] = "scheduler_note_root"
|
|
45
|
+
|
|
46
|
+
elif dict_name == "consdb":
|
|
47
|
+
col_map = {}
|
|
48
|
+
col_map["ra"] = "s_ra"
|
|
49
|
+
col_map["dec"] = "s_dec"
|
|
50
|
+
col_map["raDecDeg"] = True
|
|
51
|
+
col_map["mjd"] = "obs_start_mjd"
|
|
52
|
+
col_map["exptime"] = "exp_time"
|
|
53
|
+
col_map["visittime"] = "dark_time"
|
|
54
|
+
col_map["alt"] = "altitude"
|
|
55
|
+
col_map["az"] = "azimuth"
|
|
56
|
+
col_map["filter"] = "band"
|
|
57
|
+
col_map["band"] = "band"
|
|
58
|
+
col_map["fiveSigmaDepth"] = "stats_mag_lim_median"
|
|
59
|
+
col_map["night"] = "day_obs"
|
|
60
|
+
col_map["slewtime"] = "slew_time"
|
|
61
|
+
col_map["slewdist"] = "slew_distance"
|
|
62
|
+
col_map["seeingEff"] = "fwhm_eff"
|
|
63
|
+
col_map["seeingGeom"] = "fwhm_geom"
|
|
64
|
+
col_map["skyBrightness"] = "sky_bg_median_mag"
|
|
65
|
+
col_map["moonDistance"] = "moon_distance"
|
|
66
|
+
col_map["slewactivities"] = {}
|
|
67
|
+
col_map["metadataList"] = [
|
|
68
|
+
"airmass",
|
|
69
|
+
"normairmass",
|
|
70
|
+
"fwhm_eff",
|
|
71
|
+
"sky_bg_median_mag",
|
|
72
|
+
"stats_mag_lim_median",
|
|
73
|
+
"HA",
|
|
74
|
+
"moon_distance",
|
|
75
|
+
"solarElong",
|
|
76
|
+
"saturation_mag",
|
|
77
|
+
]
|
|
78
|
+
col_map["metadataAngleList"] = ["sky_rotation"]
|
|
79
|
+
col_map["scheduler_note"] = "scheduler_note"
|
|
80
|
+
col_map["scheduler_note_root"] = "scheduler_note_root"
|
|
81
|
+
|
|
82
|
+
elif dict_name == "fbs_sim" or dict_name == "opsimfbs":
|
|
83
|
+
col_map = {}
|
|
84
|
+
col_map["ra"] = "fieldRA"
|
|
85
|
+
col_map["dec"] = "fieldDec"
|
|
86
|
+
col_map["raDecDeg"] = True
|
|
87
|
+
col_map["mjd"] = "observationStartMJD"
|
|
88
|
+
col_map["exptime"] = "visitExposureTime"
|
|
89
|
+
col_map["visittime"] = "visitTime"
|
|
90
|
+
col_map["alt"] = "altitude"
|
|
91
|
+
col_map["az"] = "azimuth"
|
|
92
|
+
col_map["lst"] = "observationStartLST"
|
|
93
|
+
col_map["filter"] = "filter"
|
|
94
|
+
col_map["fiveSigmaDepth"] = "fiveSigmaDepth"
|
|
95
|
+
col_map["night"] = "night"
|
|
96
|
+
col_map["slewtime"] = "slewTime"
|
|
97
|
+
col_map["slewdist"] = "slewDistance"
|
|
98
|
+
col_map["seeingEff"] = "seeingFwhmEff"
|
|
99
|
+
col_map["seeingGeom"] = "seeingFwhmGeom"
|
|
100
|
+
col_map["skyBrightness"] = "skyBrightness"
|
|
101
|
+
col_map["moonDistance"] = "moonDistance"
|
|
102
|
+
col_map["slewactivities"] = {}
|
|
103
|
+
col_map["metadataList"] = [
|
|
104
|
+
"airmass",
|
|
105
|
+
"normairmass",
|
|
106
|
+
"seeingEff",
|
|
107
|
+
"skyBrightness",
|
|
108
|
+
"fiveSigmaDepth",
|
|
109
|
+
"HA",
|
|
110
|
+
"moonDistance",
|
|
111
|
+
"solarElong",
|
|
112
|
+
"saturation_mag",
|
|
113
|
+
]
|
|
114
|
+
col_map["metadataAngleList"] = ["rotSkyPos"]
|
|
115
|
+
col_map["scheduler_note"] = "scheduler_note"
|
|
116
|
+
col_map["scheduler_note_root"] = "scheduler_note_root"
|
|
117
|
+
|
|
118
|
+
elif dict_name == "opsimv4":
|
|
119
|
+
col_map = {}
|
|
120
|
+
col_map["ra"] = "fieldRA"
|
|
121
|
+
col_map["dec"] = "fieldDec"
|
|
122
|
+
col_map["raDecDeg"] = True
|
|
123
|
+
col_map["mjd"] = "observationStartMJD"
|
|
124
|
+
col_map["exptime"] = "visitExposureTime"
|
|
125
|
+
col_map["visittime"] = "visitTime"
|
|
126
|
+
col_map["alt"] = "altitude"
|
|
127
|
+
col_map["az"] = "azimuth"
|
|
128
|
+
col_map["lst"] = "observationStartLST"
|
|
129
|
+
col_map["filter"] = "filter"
|
|
130
|
+
col_map["fiveSigmaDepth"] = "fiveSigmaDepth"
|
|
131
|
+
col_map["night"] = "night"
|
|
132
|
+
col_map["slewtime"] = "slewTime"
|
|
133
|
+
col_map["slewdist"] = "slewDistance"
|
|
134
|
+
col_map["seeingEff"] = "seeingFwhmEff"
|
|
135
|
+
col_map["seeingGeom"] = "seeingFwhmGeom"
|
|
136
|
+
col_map["skyBrightness"] = "skyBrightness"
|
|
137
|
+
col_map["moonDistance"] = "moonDistance"
|
|
138
|
+
col_map["fieldId"] = "fieldId"
|
|
139
|
+
col_map["proposalId"] = "proposalId"
|
|
140
|
+
# slew speeds table
|
|
141
|
+
col_map["slewSpeedsTable"] = "SlewMaxSpeeds"
|
|
142
|
+
# slew states table
|
|
143
|
+
col_map["slewStatesTable"] = "SlewFinalState"
|
|
144
|
+
# slew activities list
|
|
145
|
+
col_map["slewActivitiesTable"] = "SlewActivities"
|
|
146
|
+
# Slew columns
|
|
147
|
+
col_map["Dome Alt Speed"] = "domeAltSpeed"
|
|
148
|
+
col_map["Dome Az Speed"] = "domeAzSpeed"
|
|
149
|
+
col_map["Tel Alt Speed"] = "telAltSpeed"
|
|
150
|
+
col_map["Tel Az Speed"] = "telAzSpeed"
|
|
151
|
+
col_map["Rotator Speed"] = "rotatorSpeed"
|
|
152
|
+
col_map["Tel Alt"] = "telAlt"
|
|
153
|
+
col_map["Tel Az"] = "telAz"
|
|
154
|
+
col_map["Rot Tel Pos"] = "rotTelPos"
|
|
155
|
+
col_map["Dome Alt"] = "domeAlt"
|
|
156
|
+
col_map["Dome Az"] = "domeAz"
|
|
157
|
+
col_map["slewactivities"] = {
|
|
158
|
+
"Dome Alt": "domalt",
|
|
159
|
+
"Dome Az": "domaz",
|
|
160
|
+
"Dome Settle": "domazsettle",
|
|
161
|
+
"Tel Alt": "telalt",
|
|
162
|
+
"Tel Az": "telaz",
|
|
163
|
+
"Tel Rot": "telrot",
|
|
164
|
+
"Tel Settle": "telsettle",
|
|
165
|
+
"TelOptics CL": "telopticsclosedloop",
|
|
166
|
+
"TelOptics OL": "telopticsopenloop",
|
|
167
|
+
"Readout": "readout",
|
|
168
|
+
"Filter": "filter",
|
|
169
|
+
}
|
|
170
|
+
col_map["metadataList"] = [
|
|
171
|
+
"airmass",
|
|
172
|
+
"normairmass",
|
|
173
|
+
"seeingEff",
|
|
174
|
+
"skyBrightness",
|
|
175
|
+
"fiveSigmaDepth",
|
|
176
|
+
"HA",
|
|
177
|
+
"moonDistance",
|
|
178
|
+
"solarElong",
|
|
179
|
+
]
|
|
180
|
+
col_map["metadataAngleList"] = ["rotSkyPos"]
|
|
181
|
+
|
|
182
|
+
elif dict_name == "opsimv3":
|
|
183
|
+
col_map = {}
|
|
184
|
+
col_map["ra"] = "fieldRA"
|
|
185
|
+
col_map["dec"] = "fieldDec"
|
|
186
|
+
col_map["raDecDeg"] = False
|
|
187
|
+
col_map["mjd"] = "expMJD"
|
|
188
|
+
col_map["exptime"] = "visitExpTime"
|
|
189
|
+
col_map["visittime"] = "visitTime"
|
|
190
|
+
col_map["alt"] = "altitude"
|
|
191
|
+
col_map["az"] = "azimuth"
|
|
192
|
+
col_map["lst"] = "lst"
|
|
193
|
+
col_map["filter"] = "filter"
|
|
194
|
+
col_map["fiveSigmaDepth"] = "fiveSigmaDepth"
|
|
195
|
+
col_map["night"] = "night"
|
|
196
|
+
col_map["slewtime"] = "slewTime"
|
|
197
|
+
col_map["slewdist"] = "slewDist"
|
|
198
|
+
col_map["seeingEff"] = "FWHMeff"
|
|
199
|
+
col_map["seeingGeom"] = "FWHMgeom"
|
|
200
|
+
col_map["skyBrightness"] = "filtSkyBrightness"
|
|
201
|
+
col_map["moonDistance"] = "dist2Moon"
|
|
202
|
+
col_map["fieldId"] = "fieldID"
|
|
203
|
+
col_map["proposalId"] = "propID"
|
|
204
|
+
# slew speeds table
|
|
205
|
+
col_map["slewSpeedsTable"] = "SlewMaxSpeeds"
|
|
206
|
+
# slew states table
|
|
207
|
+
col_map["slewStatesTable"] = "SlewStates"
|
|
208
|
+
# Slew activities list
|
|
209
|
+
col_map["slewActivitiesTable"] = "SlewActivities"
|
|
210
|
+
col_map["Dome Alt Speed"] = "domeAltSpeed"
|
|
211
|
+
col_map["Dome Az Speed"] = "domeAzSpeed"
|
|
212
|
+
col_map["Tel Alt Speed"] = "telAltSpeed"
|
|
213
|
+
col_map["Tel Az Speed"] = "telAzSpeed"
|
|
214
|
+
col_map["Rotator Speed"] = "rotatorSpeed"
|
|
215
|
+
col_map["Tel Alt"] = "telAlt"
|
|
216
|
+
col_map["Tel Az"] = "telAz"
|
|
217
|
+
col_map["Rot Tel Pos"] = "rotTelPos"
|
|
218
|
+
col_map["Dome Alt"] = "domAlt"
|
|
219
|
+
col_map["Dome Az"] = "domAz"
|
|
220
|
+
col_map["slewactivities"] = {
|
|
221
|
+
"Dome Alt": "DomAlt",
|
|
222
|
+
"Dome Az": "DomAz",
|
|
223
|
+
"Tel Alt": "TelAlt",
|
|
224
|
+
"Tel Az": "TelAz",
|
|
225
|
+
"Tel Rot": "Rotator",
|
|
226
|
+
"Settle": "Settle",
|
|
227
|
+
"TelOptics CL": "TelOpticsCL",
|
|
228
|
+
"TelOptics OL": "TelOpticsOL",
|
|
229
|
+
"Readout": "Readout",
|
|
230
|
+
"Filter": "Filter",
|
|
231
|
+
}
|
|
232
|
+
col_map["metadataList"] = [
|
|
233
|
+
"airmass",
|
|
234
|
+
"normairmass",
|
|
235
|
+
"seeingEff",
|
|
236
|
+
"skyBrightness",
|
|
237
|
+
"fiveSigmaDepth",
|
|
238
|
+
"HA",
|
|
239
|
+
"moonDistance",
|
|
240
|
+
"solarElong",
|
|
241
|
+
]
|
|
242
|
+
col_map["metadataAngleList"] = ["rotSkyPos"]
|
|
243
|
+
|
|
244
|
+
elif dict_name == "barebones":
|
|
245
|
+
col_map = {}
|
|
246
|
+
col_map["ra"] = "ra"
|
|
247
|
+
col_map["dec"] = "dec"
|
|
248
|
+
col_map["raDecDeg"] = True
|
|
249
|
+
col_map["mjd"] = "mjd"
|
|
250
|
+
col_map["exptime"] = "exptime"
|
|
251
|
+
col_map["visittime"] = "exptime"
|
|
252
|
+
col_map["alt"] = "alt"
|
|
253
|
+
col_map["az"] = "az"
|
|
254
|
+
col_map["filter"] = "filter"
|
|
255
|
+
col_map["fiveSigmaDepth"] = "fivesigmadepth"
|
|
256
|
+
col_map["night"] = "night"
|
|
257
|
+
col_map["slewtime"] = "slewtime"
|
|
258
|
+
col_map["slewdist"] = None
|
|
259
|
+
col_map["seeingGeom"] = "seeing"
|
|
260
|
+
col_map["seeingEff"] = "seeing"
|
|
261
|
+
col_map["metadataList"] = [
|
|
262
|
+
"airmass",
|
|
263
|
+
"normairmass",
|
|
264
|
+
"seeingEff",
|
|
265
|
+
"skyBrightness",
|
|
266
|
+
"fiveSigmaDepth",
|
|
267
|
+
"HA",
|
|
268
|
+
]
|
|
269
|
+
col_map["metadataAngleList"] = ["rotSkyPos"]
|
|
270
|
+
|
|
271
|
+
else:
|
|
272
|
+
raise ValueError(f"No built in column dict with name {dict_name}")
|
|
273
|
+
|
|
274
|
+
return col_map
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
__all__ = (
|
|
2
|
+
"combine_info_labels",
|
|
3
|
+
"filter_list",
|
|
4
|
+
"standard_summary",
|
|
5
|
+
"extended_summary",
|
|
6
|
+
"standard_metrics",
|
|
7
|
+
"extended_metrics",
|
|
8
|
+
"lightcurve_summary",
|
|
9
|
+
"standard_angle_metrics",
|
|
10
|
+
"summary_completeness_at_time",
|
|
11
|
+
"summary_completeness_over_h",
|
|
12
|
+
"fraction_population_at_threshold",
|
|
13
|
+
"microlensing_summary",
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
import rubin_sim.maf.metrics as metrics
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def combine_info_labels(info1, info2):
|
|
21
|
+
if info1 is not None and info2 is not None:
|
|
22
|
+
info = info1 + " " + info2
|
|
23
|
+
elif info1 is not None:
|
|
24
|
+
info = info1
|
|
25
|
+
elif info2 is not None:
|
|
26
|
+
info = info2
|
|
27
|
+
else:
|
|
28
|
+
info = None
|
|
29
|
+
return info
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def filter_list(all=True, extra_sql=None, extra_info_label=None, band_col="band"):
|
|
33
|
+
"""Return a list of filters, plot colors and orders.
|
|
34
|
+
|
|
35
|
+
Parameters
|
|
36
|
+
----------
|
|
37
|
+
all : `bool`, optional
|
|
38
|
+
Include 'all' in the list of filters and as part of the
|
|
39
|
+
colors/orders dictionaries.
|
|
40
|
+
extra_sql : `str`, optional
|
|
41
|
+
Additional sql constraint to add to constraints returned per filter.
|
|
42
|
+
extra_info_label : `str`, optional
|
|
43
|
+
Substitute info_label to add to info_label strings composed per band.
|
|
44
|
+
band_col : `str`, optional
|
|
45
|
+
The column name to use for the band (or filter).
|
|
46
|
+
|
|
47
|
+
Returns
|
|
48
|
+
-------
|
|
49
|
+
filterlist : `list` [`str]
|
|
50
|
+
colors : `dict` {`str`: `str`}
|
|
51
|
+
orders : `dict` {`str`: int}
|
|
52
|
+
sqls : `dict` {`str`: `str`}
|
|
53
|
+
info_labels : `dict` {`str`: `str}
|
|
54
|
+
"""
|
|
55
|
+
if all:
|
|
56
|
+
bandlist = ("all", "u", "g", "r", "i", "z", "y")
|
|
57
|
+
else:
|
|
58
|
+
bandlist = ("u", "g", "r", "i", "z", "y")
|
|
59
|
+
colors = {"u": "cyan", "g": "g", "r": "orange", "i": "r", "z": "m", "y": "b"}
|
|
60
|
+
orders = {"u": 1, "g": 2, "r": 3, "i": 4, "z": 5, "y": 6}
|
|
61
|
+
if all:
|
|
62
|
+
colors["all"] = "k"
|
|
63
|
+
orders["all"] = 0
|
|
64
|
+
sqls = {}
|
|
65
|
+
info_labels = {}
|
|
66
|
+
if extra_info_label is None:
|
|
67
|
+
if extra_sql is None or len(extra_sql) == 0:
|
|
68
|
+
md = ""
|
|
69
|
+
else:
|
|
70
|
+
md = "%s " % extra_sql
|
|
71
|
+
else:
|
|
72
|
+
md = "%s " % extra_info_label
|
|
73
|
+
for b in bandlist:
|
|
74
|
+
if b == "all":
|
|
75
|
+
sqls[b] = ""
|
|
76
|
+
info_labels[b] = md + "all bands"
|
|
77
|
+
else:
|
|
78
|
+
sqls[b] = f"{band_col} = '{b}'"
|
|
79
|
+
info_labels[b] = md + f"{b} band"
|
|
80
|
+
if extra_sql is not None and len(extra_sql) > 0:
|
|
81
|
+
for s in sqls:
|
|
82
|
+
if s == "all":
|
|
83
|
+
sqls[s] = extra_sql
|
|
84
|
+
else:
|
|
85
|
+
sqls[s] = f"({extra_sql}) and ({sqls[s]})"
|
|
86
|
+
return bandlist, colors, orders, sqls, info_labels
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def standard_summary(with_count=True):
|
|
90
|
+
"""A set of standard summary metrics, to calculate
|
|
91
|
+
Mean, RMS, Median, #, Max/Min, and # 3-sigma outliers.
|
|
92
|
+
|
|
93
|
+
Parameters
|
|
94
|
+
----------
|
|
95
|
+
with_count : `bool`, optional
|
|
96
|
+
Include the "Count" metric in the set of summary metrics or not.
|
|
97
|
+
|
|
98
|
+
Returns
|
|
99
|
+
-------
|
|
100
|
+
standardSummary : `list` [`maf.BaseMetric`]
|
|
101
|
+
List of metrics appropriate to use to summarize the results from
|
|
102
|
+
another metric.
|
|
103
|
+
"""
|
|
104
|
+
standardSummary = [
|
|
105
|
+
metrics.MeanMetric(),
|
|
106
|
+
metrics.RmsMetric(),
|
|
107
|
+
metrics.MedianMetric(),
|
|
108
|
+
metrics.MaxMetric(),
|
|
109
|
+
metrics.MinMetric(),
|
|
110
|
+
metrics.NoutliersNsigmaMetric(metric_name="N(+3Sigma)", n_sigma=3),
|
|
111
|
+
metrics.NoutliersNsigmaMetric(metric_name="N(-3Sigma)", n_sigma=-3.0),
|
|
112
|
+
]
|
|
113
|
+
if with_count:
|
|
114
|
+
standardSummary += [metrics.CountMetric()]
|
|
115
|
+
return standardSummary
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def extended_summary():
|
|
119
|
+
"""An extended set of summary metrics, to calculate all that is in
|
|
120
|
+
the standard summary stats, plus 25/75 percentiles.
|
|
121
|
+
|
|
122
|
+
Returns
|
|
123
|
+
--------
|
|
124
|
+
extendedSummary : `list` [`maf.BaseMetric`]
|
|
125
|
+
List of metrics appropriate to use to summarize the results
|
|
126
|
+
from another metric.
|
|
127
|
+
"""
|
|
128
|
+
extendedStats = standard_summary()
|
|
129
|
+
extendedStats += [
|
|
130
|
+
metrics.PercentileMetric(metric_name="25th%ile", percentile=25),
|
|
131
|
+
metrics.PercentileMetric(metric_name="75th%ile", percentile=75),
|
|
132
|
+
]
|
|
133
|
+
return extendedStats
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def lightcurve_summary():
|
|
137
|
+
lightcurveSummary = [
|
|
138
|
+
metrics.SumMetric(metric_name="Total detected"),
|
|
139
|
+
metrics.CountMetric(metric_name="Total lightcurves in footprint"),
|
|
140
|
+
metrics.CountMetric(metric_name="Total lightcurves on sky", mask_val=0),
|
|
141
|
+
metrics.MeanMetric(metric_name="Fraction detected in footprint (mean)"),
|
|
142
|
+
metrics.MeanMetric(mask_val=0, metric_name="Fraction detected of total (mean)"),
|
|
143
|
+
]
|
|
144
|
+
return lightcurveSummary
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def standard_metrics(colname, replace_colname=None):
|
|
148
|
+
"""A set of standard simple metrics for some quantity.
|
|
149
|
+
Typically would be applied with unislicer.
|
|
150
|
+
|
|
151
|
+
Parameters
|
|
152
|
+
----------
|
|
153
|
+
colname : `str`
|
|
154
|
+
The column name to apply the metrics to.
|
|
155
|
+
replace_colname: `str` or None, optional
|
|
156
|
+
Value to replace colname with in the metric_name.
|
|
157
|
+
i.e. if replace_colname='' then metric name is Mean,
|
|
158
|
+
instead of Mean Airmass, or
|
|
159
|
+
if replace_colname='seeingGeom', then metric name is
|
|
160
|
+
Mean seeingGeom instead of Mean seeingFwhmGeom.
|
|
161
|
+
|
|
162
|
+
Returns
|
|
163
|
+
-------
|
|
164
|
+
standardMetrics : `list` [`maf.BaseMetric`]
|
|
165
|
+
List of appropriate MAF metrics to evaluate a distribution.
|
|
166
|
+
"""
|
|
167
|
+
standardMetrics = [
|
|
168
|
+
metrics.MeanMetric(colname),
|
|
169
|
+
metrics.MedianMetric(colname),
|
|
170
|
+
metrics.MinMetric(colname),
|
|
171
|
+
metrics.MaxMetric(colname),
|
|
172
|
+
]
|
|
173
|
+
if replace_colname is not None:
|
|
174
|
+
for m in standardMetrics:
|
|
175
|
+
if len(replace_colname) > 0:
|
|
176
|
+
m.name = m.name.replace("%s" % colname, "%s" % replace_colname)
|
|
177
|
+
else:
|
|
178
|
+
m.name = m.name.rstrip(" %s" % colname)
|
|
179
|
+
return standardMetrics
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
def extended_metrics(colname, replace_colname=None):
|
|
183
|
+
"""An extended set of simple metrics for some quantity.
|
|
184
|
+
Typically applied with unislicer.
|
|
185
|
+
|
|
186
|
+
Parameters
|
|
187
|
+
----------
|
|
188
|
+
colname : `str`
|
|
189
|
+
The column name to apply the metrics to.
|
|
190
|
+
replace_colname: `str` or None, optional
|
|
191
|
+
Value to replace colname with in the metric_name.
|
|
192
|
+
i.e. if replace_colname='' then metric name is Mean,
|
|
193
|
+
instead of Mean Airmass, or
|
|
194
|
+
if replace_colname='seeingGeom', then metric name is
|
|
195
|
+
Mean seeingGeom instead of Mean seeingFwhmGeom.
|
|
196
|
+
|
|
197
|
+
Returns
|
|
198
|
+
-------
|
|
199
|
+
extendedMetrics : `list` [`maf.BaseMetric`]
|
|
200
|
+
List of appropriate MAF metrics to evaluate a distribution.
|
|
201
|
+
"""
|
|
202
|
+
extendedMetrics = standard_metrics(colname, replace_colname=None)
|
|
203
|
+
extendedMetrics += [
|
|
204
|
+
metrics.RmsMetric(colname),
|
|
205
|
+
metrics.NoutliersNsigmaMetric(colname, metric_name="N(+3Sigma) " + colname, n_sigma=3),
|
|
206
|
+
metrics.NoutliersNsigmaMetric(colname, metric_name="N(-3Sigma) " + colname, n_sigma=-3),
|
|
207
|
+
metrics.PercentileMetric(colname, percentile=25),
|
|
208
|
+
metrics.PercentileMetric(colname, percentile=75),
|
|
209
|
+
metrics.CountMetric(colname),
|
|
210
|
+
]
|
|
211
|
+
if replace_colname is not None:
|
|
212
|
+
for m in extendedMetrics:
|
|
213
|
+
if len(replace_colname) > 0:
|
|
214
|
+
m.name = m.name.replace("%s" % colname, "%s" % replace_colname)
|
|
215
|
+
else:
|
|
216
|
+
m.name = m.name.rstrip(" %s" % colname)
|
|
217
|
+
return extendedMetrics
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
def standard_angle_metrics(colname, replace_colname=None):
|
|
221
|
+
"""A set of standard simple metrics for a wrap-around angle quantity.
|
|
222
|
+
|
|
223
|
+
Parameters
|
|
224
|
+
----------
|
|
225
|
+
colname : `str`
|
|
226
|
+
The column name to apply the metrics to.
|
|
227
|
+
replace_colname: `str` or None, optional
|
|
228
|
+
Value to replace colname with in the metric_name.
|
|
229
|
+
i.e. if replace_colname='' then metric name is Mean,
|
|
230
|
+
instead of Mean Airmass, or
|
|
231
|
+
if replace_colname='seeingGeom', then metric name is
|
|
232
|
+
Mean seeingGeom instead of Mean seeingFwhmGeom.
|
|
233
|
+
|
|
234
|
+
Returns
|
|
235
|
+
-------
|
|
236
|
+
standardAngleMetrics : `list` [`maf.BaseMetric`]
|
|
237
|
+
List of appropriate MAF metrics for angle distributions.
|
|
238
|
+
"""
|
|
239
|
+
standardAngleMetrics = [
|
|
240
|
+
metrics.MeanAngleMetric(colname),
|
|
241
|
+
metrics.RmsAngleMetric(colname),
|
|
242
|
+
metrics.FullRangeAngleMetric(colname),
|
|
243
|
+
metrics.MinMetric(colname),
|
|
244
|
+
metrics.MaxMetric(colname),
|
|
245
|
+
]
|
|
246
|
+
if replace_colname is not None:
|
|
247
|
+
for m in standardAngleMetrics:
|
|
248
|
+
if len(replace_colname) > 0:
|
|
249
|
+
m.name = m.name.replace("%s" % colname, "%s" % replace_colname)
|
|
250
|
+
else:
|
|
251
|
+
m.name = m.name.rstrip(" %s" % colname)
|
|
252
|
+
return standardAngleMetrics
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
def summary_completeness_at_time(times, h_val, h_index=0.33):
|
|
256
|
+
"""A simple list of summary metrics to be applied to the Discovery_Time
|
|
257
|
+
or PreviouslyKnown metrics.
|
|
258
|
+
(can be used with any moving object metric which returns the
|
|
259
|
+
time of discovery).
|
|
260
|
+
|
|
261
|
+
Parameters
|
|
262
|
+
----------
|
|
263
|
+
times : `np.ndarray `or list` [`float`]
|
|
264
|
+
The times at which to evaluate the completeness @ Hval.
|
|
265
|
+
h_val : `float`
|
|
266
|
+
The H value at which to evaluate the completeness
|
|
267
|
+
(cumulative and differential).
|
|
268
|
+
h_index : `float`, optional
|
|
269
|
+
The index of the power law to integrate H over
|
|
270
|
+
(for cumulative completeness).
|
|
271
|
+
|
|
272
|
+
Returns
|
|
273
|
+
-------
|
|
274
|
+
summaryMetrics : `list` [`maf.MoCompletenessAtTimeMetric`]
|
|
275
|
+
List of completeness metrics to be evaluated at the specified times.
|
|
276
|
+
"""
|
|
277
|
+
summaryMetrics = [
|
|
278
|
+
metrics.MoCompletenessAtTimeMetric(times=times, hval=h_val, hindex=h_index, cumulative=False),
|
|
279
|
+
metrics.MoCompletenessAtTimeMetric(times=times, hval=h_val, hindex=h_index, cumulative=True),
|
|
280
|
+
]
|
|
281
|
+
return summaryMetrics
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
def summary_completeness_over_h(requiredChances=1, Hindex=0.33):
|
|
285
|
+
"""A simple list of summary metrics to be applied to the
|
|
286
|
+
Discovery_N_Chances metric.
|
|
287
|
+
|
|
288
|
+
Parameters
|
|
289
|
+
----------
|
|
290
|
+
requiredChances : `int`, optional
|
|
291
|
+
Number of discovery opportunities required to consider an
|
|
292
|
+
object 'discovered'.
|
|
293
|
+
Hindex : `float`, optional
|
|
294
|
+
The index of the power law to integrate H over
|
|
295
|
+
(for cumulative completeness).
|
|
296
|
+
|
|
297
|
+
Returns
|
|
298
|
+
-------
|
|
299
|
+
summaryMetrics : `list` [`maf.MoCompletenessMetric`]
|
|
300
|
+
List of moving object MoCompleteness metrics
|
|
301
|
+
(cumulative and differential)
|
|
302
|
+
"""
|
|
303
|
+
summaryMetrics = [
|
|
304
|
+
metrics.MoCompletenessMetric(threshold=requiredChances, cumulative=False, hindex=Hindex),
|
|
305
|
+
metrics.MoCompletenessMetric(threshold=requiredChances, cumulative=True, hindex=Hindex),
|
|
306
|
+
]
|
|
307
|
+
return summaryMetrics
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
def fraction_population_at_threshold(thresholds, optnames=None):
|
|
311
|
+
"""Creates a list of summary metrics to be applied to any moving object
|
|
312
|
+
metric which reports a float value, calculating the fraction of the
|
|
313
|
+
population above X.
|
|
314
|
+
|
|
315
|
+
Parameters
|
|
316
|
+
----------
|
|
317
|
+
thresholds : `list` [`float`]
|
|
318
|
+
The thresholds at which to calculate what fraction of the population
|
|
319
|
+
exceeds these values.
|
|
320
|
+
optnames : `list` [`str`], optional
|
|
321
|
+
If provided, these names will be used instead of the threshold values
|
|
322
|
+
when constructing the metric names.
|
|
323
|
+
This allows more descriptive summary statistic names.
|
|
324
|
+
|
|
325
|
+
Returns
|
|
326
|
+
-------
|
|
327
|
+
fracMetrics : `list` [`maf.MoCompletenessMetric`]
|
|
328
|
+
List of moving object MoCompleteness metrics
|
|
329
|
+
(differential fractions of the population).
|
|
330
|
+
"""
|
|
331
|
+
fracMetrics = []
|
|
332
|
+
for i, threshold in enumerate(thresholds):
|
|
333
|
+
if optnames is not None:
|
|
334
|
+
o = optnames[i]
|
|
335
|
+
else:
|
|
336
|
+
o = threshold
|
|
337
|
+
m = metrics.MoCompletenessMetric(
|
|
338
|
+
threshold=threshold, cumulative=False, metric_name=f"FractionPop {o}"
|
|
339
|
+
)
|
|
340
|
+
fracMetrics.append(m)
|
|
341
|
+
return fracMetrics
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
def microlensing_summary(metric_type, npts_required=10, Fisher_sigmatE_tE_cutoff=0.1):
|
|
345
|
+
"""Calculate summary metrics for the microlensing population metrics.
|
|
346
|
+
|
|
347
|
+
Parameters
|
|
348
|
+
-----------
|
|
349
|
+
metric_type : `str`
|
|
350
|
+
Identify whether the metric is "Npts" or Fisher"
|
|
351
|
+
npts_required : `int`, optional
|
|
352
|
+
Count the fraction of microlensing events with more than npts_required
|
|
353
|
+
observations
|
|
354
|
+
Fisher_sigmatE_tE_cutoff : `float`, optional
|
|
355
|
+
Count the fraction of microlensing events with characterization
|
|
356
|
+
uncertainty less than this
|
|
357
|
+
|
|
358
|
+
Returns
|
|
359
|
+
-------
|
|
360
|
+
microlensingSummary : `list` [`maf.BaseMetric`]
|
|
361
|
+
List of appropriate MAF metrics for this type of microlensing
|
|
362
|
+
metric with the specified threshold values.
|
|
363
|
+
"""
|
|
364
|
+
if metric_type != "Npts" and metric_type != "Fisher":
|
|
365
|
+
raise Exception('metric_type must be "Npts" or "Fisher"')
|
|
366
|
+
if metric_type == "Npts":
|
|
367
|
+
microlensingSummary = [
|
|
368
|
+
metrics.FracAboveMetric(
|
|
369
|
+
cutoff=npts_required,
|
|
370
|
+
metric_name=f"Fraction w/ at least {npts_required} points",
|
|
371
|
+
),
|
|
372
|
+
metrics.CountMetric(metric_name="Total lightcurves in footprint"),
|
|
373
|
+
metrics.CountMetric(metric_name="Total lightcurves on sky", mask_val=0),
|
|
374
|
+
metrics.MeanMetric(metric_name="Mean number of points per lightcurves in footprint"),
|
|
375
|
+
metrics.MeanMetric(mask_val=0, metric_name="Mean number of points per lightcurves in total"),
|
|
376
|
+
]
|
|
377
|
+
elif metric_type == "Fisher":
|
|
378
|
+
microlensingSummary = [
|
|
379
|
+
metrics.FracBelowMetric(
|
|
380
|
+
cutoff=Fisher_sigmatE_tE_cutoff,
|
|
381
|
+
metric_name=f"Fraction w/ sigma_tE/tE < {Fisher_sigmatE_tE_cutoff}",
|
|
382
|
+
),
|
|
383
|
+
metrics.CountMetric(metric_name="Total lightcurves in footprint"),
|
|
384
|
+
metrics.CountMetric(metric_name="Total lightcurves on sky", mask_val=0),
|
|
385
|
+
metrics.RealMeanMetric(metric_name="Mean sigma_tE/tE in footprint (mean)"),
|
|
386
|
+
metrics.RealMeanMetric(mask_val=0, metric_name="Mean sigma_tE/tE of total (mean)"),
|
|
387
|
+
]
|
|
388
|
+
return microlensingSummary
|