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,362 @@
|
|
|
1
|
+
__all__ = ("TdeLc", "TdePopMetric", "TdePopMetricQuality", "generate_tde_pop_slicer")
|
|
2
|
+
|
|
3
|
+
import glob
|
|
4
|
+
import os
|
|
5
|
+
|
|
6
|
+
import numpy as np
|
|
7
|
+
from rubin_scheduler.data import get_data_dir
|
|
8
|
+
from rubin_scheduler.utils import SURVEY_START_MJD, uniform_sphere
|
|
9
|
+
|
|
10
|
+
import rubin_sim.maf.metrics as metrics
|
|
11
|
+
import rubin_sim.maf.slicers as slicers
|
|
12
|
+
from rubin_sim.phot_utils import DustValues
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class TdeLc:
|
|
16
|
+
"""
|
|
17
|
+
Read in some TDE lightcurves
|
|
18
|
+
|
|
19
|
+
Parameters
|
|
20
|
+
----------
|
|
21
|
+
file_list : `list` [`str`], opt
|
|
22
|
+
List of file paths to load.
|
|
23
|
+
If None, loads up all the files from $RUBIN_SIM_DATA/maf/tde/
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
def __init__(self, file_list=None):
|
|
27
|
+
if file_list is None:
|
|
28
|
+
sims_maf_contrib_dir = get_data_dir()
|
|
29
|
+
file_list = glob.glob(os.path.join(sims_maf_contrib_dir, "maf/tde/*.dat"))
|
|
30
|
+
|
|
31
|
+
lcs = []
|
|
32
|
+
for filename in file_list:
|
|
33
|
+
lcs.append(np.genfromtxt(filename, dtype=[("ph", "f8"), ("mag", "f8"), ("filter", "U1")]))
|
|
34
|
+
|
|
35
|
+
# Let's organize the data in to a list of dicts for easy lookup
|
|
36
|
+
self.data = []
|
|
37
|
+
filternames = "ugrizy"
|
|
38
|
+
for lc in lcs:
|
|
39
|
+
new_dict = {}
|
|
40
|
+
for filtername in filternames:
|
|
41
|
+
infilt = np.where(lc["filter"] == filtername)
|
|
42
|
+
new_dict[filtername] = lc[infilt]
|
|
43
|
+
self.data.append(new_dict)
|
|
44
|
+
|
|
45
|
+
def interp(self, t, filtername, lc_indx=0):
|
|
46
|
+
"""
|
|
47
|
+
t : array of floats
|
|
48
|
+
The times to interpolate the light curve to.
|
|
49
|
+
filtername : str
|
|
50
|
+
The filter. one of ugrizy
|
|
51
|
+
lc_index : int (0)
|
|
52
|
+
Which file to use.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
result = np.interp(
|
|
56
|
+
t,
|
|
57
|
+
self.data[lc_indx][filtername]["ph"],
|
|
58
|
+
self.data[lc_indx][filtername]["mag"],
|
|
59
|
+
left=99,
|
|
60
|
+
right=99,
|
|
61
|
+
)
|
|
62
|
+
return result
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class TdePopMetric(metrics.BaseMetric):
|
|
66
|
+
def __init__(
|
|
67
|
+
self,
|
|
68
|
+
metric_name="TDEsPopMetric",
|
|
69
|
+
mjd_col="observationStartMJD",
|
|
70
|
+
m5_col="fiveSigmaDepth",
|
|
71
|
+
filter_col="band",
|
|
72
|
+
night_col="night",
|
|
73
|
+
pts_needed=2,
|
|
74
|
+
file_list=None,
|
|
75
|
+
mjd0=SURVEY_START_MJD,
|
|
76
|
+
**kwargs,
|
|
77
|
+
):
|
|
78
|
+
maps = ["DustMap"]
|
|
79
|
+
self.mjd_col = mjd_col
|
|
80
|
+
self.m5_col = m5_col
|
|
81
|
+
self.filter_col = filter_col
|
|
82
|
+
self.night_col = night_col
|
|
83
|
+
self.pts_needed = pts_needed
|
|
84
|
+
|
|
85
|
+
self.lightcurves = TdeLc(file_list=file_list)
|
|
86
|
+
self.mjd0 = mjd0
|
|
87
|
+
|
|
88
|
+
dust_properties = DustValues()
|
|
89
|
+
self.ax1 = dust_properties.ax1
|
|
90
|
+
|
|
91
|
+
cols = [self.mjd_col, self.m5_col, self.filter_col, self.night_col]
|
|
92
|
+
super(TdePopMetric, self).__init__(
|
|
93
|
+
col=cols, units="Detected, 0 or 1", metric_name=metric_name, maps=maps, **kwargs
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
def _pre_peak_detect(self, data_slice, slice_point, mags, t):
|
|
97
|
+
"""
|
|
98
|
+
Simple detection criteria
|
|
99
|
+
"""
|
|
100
|
+
result = 0
|
|
101
|
+
# Simple alert criteria.
|
|
102
|
+
# Could make more in depth, or use reduce functions
|
|
103
|
+
# to have multiple criteria checked.
|
|
104
|
+
pre_peak_detected = np.where((t < 0) & (mags < data_slice[self.m5_col]))[0]
|
|
105
|
+
|
|
106
|
+
if pre_peak_detected.size > self.pts_needed:
|
|
107
|
+
result = 1
|
|
108
|
+
return result
|
|
109
|
+
|
|
110
|
+
def _some_color_detect(self, data_slice, slice_point, mags, t):
|
|
111
|
+
result = 1
|
|
112
|
+
# 1 detection pre peak
|
|
113
|
+
pre_peak_detected = np.where((t < -10) & (mags < data_slice[self.m5_col]))[0]
|
|
114
|
+
if np.size(pre_peak_detected) < 1:
|
|
115
|
+
return 0
|
|
116
|
+
|
|
117
|
+
# At least 3 filters within 10 days of peak
|
|
118
|
+
around_peak = np.where((np.abs(t) < 5) & (mags < data_slice[self.m5_col]))[0]
|
|
119
|
+
if np.size(np.unique(data_slice[self.filter_col][around_peak])) < 3:
|
|
120
|
+
return 0
|
|
121
|
+
|
|
122
|
+
# At least 2 bands after peak
|
|
123
|
+
post_peak = np.where((t > 10) & (t < 30) & (mags < data_slice[self.m5_col]))[0]
|
|
124
|
+
if np.size(np.unique(data_slice[self.filter_col][post_peak])) < 2:
|
|
125
|
+
return 0
|
|
126
|
+
|
|
127
|
+
return result
|
|
128
|
+
|
|
129
|
+
def _some_color_pu_detect(self, data_slice, slice_point, mags, t):
|
|
130
|
+
result = 1
|
|
131
|
+
# 1 detection pre peak
|
|
132
|
+
pre_peak_detected = np.where((t < -10) & (mags < data_slice[self.m5_col]))[0]
|
|
133
|
+
if np.size(pre_peak_detected) < 1:
|
|
134
|
+
return 0
|
|
135
|
+
|
|
136
|
+
# 1 detection in u and any other band near peak
|
|
137
|
+
around_peak = np.where((np.abs(t) < 5) & (mags < data_slice[self.m5_col]))[0]
|
|
138
|
+
filters = np.unique(data_slice[self.filter_col][around_peak])
|
|
139
|
+
if np.size(filters) < 2:
|
|
140
|
+
return 0
|
|
141
|
+
if "u" not in filters:
|
|
142
|
+
return 0
|
|
143
|
+
|
|
144
|
+
post_peak = np.where((t > 10) & (t < 30) & (mags < data_slice[self.m5_col]))[0]
|
|
145
|
+
filters = np.unique(data_slice[self.filter_col][post_peak])
|
|
146
|
+
if np.size(filters) < 2:
|
|
147
|
+
return 0
|
|
148
|
+
if "u" not in filters:
|
|
149
|
+
return 0
|
|
150
|
+
|
|
151
|
+
return result
|
|
152
|
+
|
|
153
|
+
def run(self, data_slice, slice_point=None):
|
|
154
|
+
result = {}
|
|
155
|
+
t = data_slice[self.mjd_col] - self.mjd0 - slice_point["peak_time"]
|
|
156
|
+
mags = np.zeros(t.size, dtype=float)
|
|
157
|
+
|
|
158
|
+
for filtername in np.unique(data_slice[self.filter_col]):
|
|
159
|
+
infilt = np.where(data_slice[self.filter_col] == filtername)
|
|
160
|
+
mags[infilt] = self.lightcurves.interp(t[infilt], filtername, lc_indx=slice_point["file_indx"])
|
|
161
|
+
# Apply dust extinction on the light curve
|
|
162
|
+
mags[infilt] += self.ax1[filtername] * slice_point["ebv"]
|
|
163
|
+
|
|
164
|
+
result["pre_peak"] = self._pre_peak_detect(data_slice, slice_point, mags, t)
|
|
165
|
+
result["some_color"] = self._some_color_detect(data_slice, slice_point, mags, t)
|
|
166
|
+
result["some_color_pu"] = self._some_color_pu_detect(data_slice, slice_point, mags, t)
|
|
167
|
+
|
|
168
|
+
return result
|
|
169
|
+
|
|
170
|
+
def reduce_prepeak(self, metric):
|
|
171
|
+
return metric["pre_peak"]
|
|
172
|
+
|
|
173
|
+
def reduce_some_color(self, metric):
|
|
174
|
+
return metric["some_color"]
|
|
175
|
+
|
|
176
|
+
def reduce_some_color_pu(self, metric):
|
|
177
|
+
return metric["some_color_pu"]
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class TdePopMetricQuality(metrics.BaseMetric):
|
|
181
|
+
"""Evaluate the likelihood of detecting a specific TDE.
|
|
182
|
+
Works with the TDEPopSlicer, which adds TDE events to the slice_points.
|
|
183
|
+
|
|
184
|
+
Returns 0 (not detected) or 1 (detected) for TDEs with various
|
|
185
|
+
detection criteria.
|
|
186
|
+
'some_color' requires 1 detection pre-peak, 3 detections in different
|
|
187
|
+
filters within 10 days of the peak, and 2 detections in different bands
|
|
188
|
+
within tmax post-peak. Averages 1 detection every other night.
|
|
189
|
+
'some_color_pu' has similar requirements, but constrains one
|
|
190
|
+
of the near-peak detections to be in u band and 1 of the
|
|
191
|
+
post-peak detections to be in u band.
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
Parameters
|
|
195
|
+
----------
|
|
196
|
+
tmin : `float`, opt
|
|
197
|
+
Minimum time for first detection (days)
|
|
198
|
+
tmax : `float`, opt
|
|
199
|
+
Maximum time in the lightcurve for detection (days).
|
|
200
|
+
file_list : `list` [`str`], opt
|
|
201
|
+
The names of the TDE lightcurve data files.
|
|
202
|
+
mjd0 : `float`, opt
|
|
203
|
+
The start of the survey.
|
|
204
|
+
"""
|
|
205
|
+
|
|
206
|
+
def __init__(
|
|
207
|
+
self,
|
|
208
|
+
metric_name="TDEsPopMetricQuality",
|
|
209
|
+
mjd_col="observationStartMJD",
|
|
210
|
+
m5_col="fiveSigmaDepth",
|
|
211
|
+
filter_col="band",
|
|
212
|
+
night_col="night",
|
|
213
|
+
tmin=-30,
|
|
214
|
+
tmax=100,
|
|
215
|
+
file_list=None,
|
|
216
|
+
mjd0=SURVEY_START_MJD,
|
|
217
|
+
**kwargs,
|
|
218
|
+
):
|
|
219
|
+
maps = ["DustMap"]
|
|
220
|
+
self.mjd_col = mjd_col
|
|
221
|
+
self.m5_col = m5_col
|
|
222
|
+
self.filter_col = filter_col
|
|
223
|
+
self.night_col = night_col
|
|
224
|
+
self.tmin = tmin
|
|
225
|
+
self.tmax = tmax
|
|
226
|
+
|
|
227
|
+
self.lightcurves = TdeLc(file_list=file_list)
|
|
228
|
+
self.mjd0 = mjd0
|
|
229
|
+
|
|
230
|
+
dust_properties = DustValues()
|
|
231
|
+
self.ax1 = dust_properties.ax1
|
|
232
|
+
|
|
233
|
+
cols = [self.mjd_col, self.m5_col, self.filter_col, self.night_col]
|
|
234
|
+
super(TdePopMetricQuality, self).__init__(
|
|
235
|
+
col=cols,
|
|
236
|
+
units="Bad: 0, Good (obs every 2 night): 1",
|
|
237
|
+
metric_name=metric_name,
|
|
238
|
+
maps=maps,
|
|
239
|
+
**kwargs,
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
def _some_color_pnum_detect(self, data_slice, mags, t):
|
|
243
|
+
# 1 detection pre peak
|
|
244
|
+
pre_peak_detected = np.where((t < -10) & (mags < data_slice[self.m5_col]))[0]
|
|
245
|
+
if np.size(pre_peak_detected) < 1:
|
|
246
|
+
return 0
|
|
247
|
+
|
|
248
|
+
# At least 3 filters within 10 days of peak
|
|
249
|
+
around_peak = np.where((np.abs(t) < 5) & (mags < data_slice[self.m5_col]))[0]
|
|
250
|
+
if np.size(np.unique(data_slice[self.filter_col][around_peak])) < 3:
|
|
251
|
+
return 0
|
|
252
|
+
|
|
253
|
+
# At least 2 bands after peak
|
|
254
|
+
post_peak = np.where((t > 10) & (t < 30) & (mags < data_slice[self.m5_col]))[0]
|
|
255
|
+
if np.size(np.unique(data_slice[self.filter_col][post_peak])) < 2:
|
|
256
|
+
return 0
|
|
257
|
+
|
|
258
|
+
# count number of data points in the light curve
|
|
259
|
+
obs_points = np.where((t > self.tmin) & (t < self.tmax) & (mags < data_slice[self.m5_col]))[0]
|
|
260
|
+
|
|
261
|
+
# define the time range around peak in which the number of
|
|
262
|
+
# data points is measured
|
|
263
|
+
t_range = self.tmax - self.tmin
|
|
264
|
+
|
|
265
|
+
# number of data points / time range gives a "score" for
|
|
266
|
+
# light curve quality
|
|
267
|
+
# 0: did not pass some_color requirements;
|
|
268
|
+
# 1: passed some_color requirements and has 1 data point
|
|
269
|
+
# every other night
|
|
270
|
+
nresult = np.size(obs_points) / t_range
|
|
271
|
+
|
|
272
|
+
return nresult
|
|
273
|
+
|
|
274
|
+
def _some_color_pu_pnum_detect(self, data_slice, mags, t):
|
|
275
|
+
# 1 detection pre peak
|
|
276
|
+
pre_peak_detected = np.where((t < -10) & (mags < data_slice[self.m5_col]))[0]
|
|
277
|
+
if np.size(pre_peak_detected) < 1:
|
|
278
|
+
return 0
|
|
279
|
+
|
|
280
|
+
# 1 detection in u and any other band near peak
|
|
281
|
+
around_peak = np.where((np.abs(t) < 5) & (mags < data_slice[self.m5_col]))[0]
|
|
282
|
+
filters = np.unique(data_slice[self.filter_col][around_peak])
|
|
283
|
+
if np.size(filters) < 2:
|
|
284
|
+
return 0
|
|
285
|
+
if "u" not in filters:
|
|
286
|
+
return 0
|
|
287
|
+
|
|
288
|
+
# 1 detecion in u and any other band post peak
|
|
289
|
+
post_peak = np.where((t > 10) & (t < 30) & (mags < data_slice[self.m5_col]))[0]
|
|
290
|
+
filters = np.unique(data_slice[self.filter_col][post_peak])
|
|
291
|
+
if np.size(filters) < 2:
|
|
292
|
+
return 0
|
|
293
|
+
if "u" not in filters:
|
|
294
|
+
return 0
|
|
295
|
+
|
|
296
|
+
# count number of data points in the light curve
|
|
297
|
+
obs_points = np.where((t > self.tmin) & (t < self.tmax) & (mags < data_slice[self.m5_col]))[0]
|
|
298
|
+
|
|
299
|
+
# define the time range around peak in which the number of
|
|
300
|
+
# data points is measured
|
|
301
|
+
t_range = self.tmax - self.tmin
|
|
302
|
+
|
|
303
|
+
# number of data points / time range gives a "score" for
|
|
304
|
+
# light curve quality
|
|
305
|
+
# 0: did not pass some_color_pu requirements;
|
|
306
|
+
# 1: passed some_color_pu requirements and has 1 data point
|
|
307
|
+
# every other night
|
|
308
|
+
nresult = np.size(obs_points) / t_range
|
|
309
|
+
|
|
310
|
+
return nresult
|
|
311
|
+
|
|
312
|
+
def run(self, data_slice, slice_point):
|
|
313
|
+
result = {}
|
|
314
|
+
t = data_slice[self.mjd_col] - self.mjd0 - slice_point["peak_time"]
|
|
315
|
+
mags = np.zeros(t.size, dtype=float)
|
|
316
|
+
|
|
317
|
+
for filtername in np.unique(data_slice[self.filter_col]):
|
|
318
|
+
infilt = np.where(data_slice[self.filter_col] == filtername)
|
|
319
|
+
mags[infilt] = self.lightcurves.interp(t[infilt], filtername, lc_indx=slice_point["file_indx"])
|
|
320
|
+
# Apply dust extinction on the light curve
|
|
321
|
+
mags[infilt] += self.ax1[filtername] * slice_point["ebv"]
|
|
322
|
+
|
|
323
|
+
result["some_color_pnum"] = self._some_color_pnum_detect(data_slice, mags, t)
|
|
324
|
+
result["some_color_pu_pnum"] = self._some_color_pu_pnum_detect(data_slice, mags, t)
|
|
325
|
+
|
|
326
|
+
return result
|
|
327
|
+
|
|
328
|
+
def reduce_some_color_pnum(self, metric):
|
|
329
|
+
return metric["some_color_pnum"]
|
|
330
|
+
|
|
331
|
+
def reduce_some_color_pu_pnum(self, metric):
|
|
332
|
+
return metric["some_color_pu_pnum"]
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
def generate_tde_pop_slicer(t_start=1, t_end=3652, n_events=10000, seed=42, n_files=7):
|
|
336
|
+
"""Generate a population of TDE events,
|
|
337
|
+
and put the info about them into a UserPointSlicer object.
|
|
338
|
+
|
|
339
|
+
Parameters
|
|
340
|
+
----------
|
|
341
|
+
t_start : `float`, opt
|
|
342
|
+
The night to start tde events on (days)
|
|
343
|
+
t_end : `float`, opt
|
|
344
|
+
The final night of TDE events
|
|
345
|
+
n_events : `int`, opt
|
|
346
|
+
The number of TDE events to generate
|
|
347
|
+
seed : `float`, opt
|
|
348
|
+
The seed passed to np.random
|
|
349
|
+
n_files : `int`, opt
|
|
350
|
+
The number of different TDE lightcurves to use
|
|
351
|
+
"""
|
|
352
|
+
|
|
353
|
+
ra, dec = uniform_sphere(n_events, seed=seed)
|
|
354
|
+
peak_times = np.random.uniform(low=t_start, high=t_end, size=n_events)
|
|
355
|
+
file_indx = np.floor(np.random.uniform(low=0, high=n_files, size=n_events)).astype(int)
|
|
356
|
+
|
|
357
|
+
# Set up the slicer to evaluate the catalog we just made
|
|
358
|
+
slicer = slicers.UserPointsSlicer(ra, dec, lat_lon_deg=True, badval=0)
|
|
359
|
+
# Add any additional information about each object to the slicer
|
|
360
|
+
slicer.slice_points["peak_time"] = peak_times
|
|
361
|
+
slicer.slice_points["file_indx"] = file_indx
|
|
362
|
+
return slicer
|