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,104 @@
|
|
|
1
|
+
__all__ = ("ColInfo",)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from .base_stacker import BaseStacker
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ColInfo:
|
|
8
|
+
"""Holds the units and source (stacker or database) locations
|
|
9
|
+
for data columns.
|
|
10
|
+
|
|
11
|
+
The stacker classes which will generate stacker columns are tracked here,
|
|
12
|
+
as well as some default units for common opsim columns.
|
|
13
|
+
|
|
14
|
+
See ColInfo.unit_dict for the unit information of database columns.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
def __init__(self):
|
|
18
|
+
self.default_data_source = None
|
|
19
|
+
self.default_unit = ""
|
|
20
|
+
self.unit_dict = {
|
|
21
|
+
"filter": "filter",
|
|
22
|
+
"seqnNum": "#",
|
|
23
|
+
"expMJD": "MJD",
|
|
24
|
+
"observationStartMJD": "MJD",
|
|
25
|
+
"observationStartLST": "deg",
|
|
26
|
+
"visitExposureTime": "s",
|
|
27
|
+
"slewTime": "s",
|
|
28
|
+
"slewDist": "rad",
|
|
29
|
+
"rotSkyPos": "deg",
|
|
30
|
+
"rotTelPos": "deg",
|
|
31
|
+
"rawSeeing": "arcsec",
|
|
32
|
+
"finSeeing": "arcsec",
|
|
33
|
+
"FWHMeff": "arcsec",
|
|
34
|
+
"FWHMgeom": "arcsec",
|
|
35
|
+
"seeingFwhmEff": "arcsec",
|
|
36
|
+
"seeingFwhmGeom": "arcsec",
|
|
37
|
+
"seeingFwhm500": "arcsec",
|
|
38
|
+
"seeing": "arcsec",
|
|
39
|
+
"airmass": "X",
|
|
40
|
+
"night": "days",
|
|
41
|
+
"moonRA": "rad",
|
|
42
|
+
"moonDec": "rad",
|
|
43
|
+
"moonAlt": "rad",
|
|
44
|
+
"dist2Moon": "rad",
|
|
45
|
+
"filtSkyBrightness": "mag/sq arcsec",
|
|
46
|
+
"skyBrightness": "mag/sq arcsec",
|
|
47
|
+
"fiveSigmaDepth": "mag",
|
|
48
|
+
"solarElong": "degrees",
|
|
49
|
+
}
|
|
50
|
+
# Go through the available stackers and add any units,
|
|
51
|
+
# and identify their source methods.
|
|
52
|
+
self.source_dict = {}
|
|
53
|
+
for stacker_class in BaseStacker.registry.values():
|
|
54
|
+
stacker = stacker_class()
|
|
55
|
+
for col, units in zip(stacker.cols_added, stacker.units):
|
|
56
|
+
self.source_dict[col] = stacker_class
|
|
57
|
+
self.unit_dict[col] = units
|
|
58
|
+
# Note that a 'unique' list of methods should be built from the
|
|
59
|
+
# resulting returned methods, at whatever point the derived data
|
|
60
|
+
# columns will be calculated.
|
|
61
|
+
|
|
62
|
+
def get_units(self, col_name):
|
|
63
|
+
"""Return the appropriate units for col_name.
|
|
64
|
+
|
|
65
|
+
If no units have been defined for a given column,
|
|
66
|
+
return the default units ('').
|
|
67
|
+
|
|
68
|
+
Parameters
|
|
69
|
+
----------
|
|
70
|
+
col_name : `str`
|
|
71
|
+
The name of the column
|
|
72
|
+
|
|
73
|
+
Returns
|
|
74
|
+
-------
|
|
75
|
+
units : `str`
|
|
76
|
+
"""
|
|
77
|
+
if col_name is None or col_name not in self.unit_dict:
|
|
78
|
+
return self.default_unit
|
|
79
|
+
else:
|
|
80
|
+
return self.unit_dict[col_name]
|
|
81
|
+
|
|
82
|
+
def get_data_source(self, col_name):
|
|
83
|
+
"""Identify the appropriate source for a given column.
|
|
84
|
+
|
|
85
|
+
For values which are calculated via a stacker, the returned
|
|
86
|
+
value is the stacker class.
|
|
87
|
+
For values which do not have a recorded source or are known to
|
|
88
|
+
be coming from the database, the result is
|
|
89
|
+
self.default_data_source (None), which will be assumed to be
|
|
90
|
+
queryable from the database.
|
|
91
|
+
|
|
92
|
+
Parameters
|
|
93
|
+
----------
|
|
94
|
+
col_name : `str`
|
|
95
|
+
The name of the column.
|
|
96
|
+
|
|
97
|
+
Returns
|
|
98
|
+
-------
|
|
99
|
+
data_source : `rubin_sim.maf.stacker` or None
|
|
100
|
+
"""
|
|
101
|
+
if col_name in self.source_dict:
|
|
102
|
+
return self.source_dict[col_name]
|
|
103
|
+
else:
|
|
104
|
+
return self.default_data_source
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
__all__ = ("WFDlabelStacker",)
|
|
2
|
+
|
|
3
|
+
import healpy as hp
|
|
4
|
+
import numpy as np
|
|
5
|
+
|
|
6
|
+
from .base_stacker import BaseStacker
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class WFDlabelStacker(BaseStacker):
|
|
10
|
+
"""Add an 'areaId' column to flag whether a visit was
|
|
11
|
+
inside the 'footprint'.
|
|
12
|
+
|
|
13
|
+
Parameters
|
|
14
|
+
----------
|
|
15
|
+
footprint : `np.NDarray`, optional
|
|
16
|
+
The healpix map indicating the desired footprint region.
|
|
17
|
+
If this is not defined (default None),
|
|
18
|
+
then the entire sky is used as the footprint.
|
|
19
|
+
fp_threshold : `float`, optional
|
|
20
|
+
The threshold for the fraction of the visit area which
|
|
21
|
+
falls within the footprint in order
|
|
22
|
+
to be counted as 'in' the footprint. Default 0.4.
|
|
23
|
+
areaIdName : `str`, optional
|
|
24
|
+
Value to place in the areaId column for visits which match this area.
|
|
25
|
+
ra_col : `str`, optional
|
|
26
|
+
The name of the RA column. Default fieldRA.
|
|
27
|
+
dec_col : `str`, optional
|
|
28
|
+
The name of the Dec column. Default fieldDec.
|
|
29
|
+
note_col : `str`, optional
|
|
30
|
+
The name of the 'note' (scheduler_note) column in the database.
|
|
31
|
+
This is used to identify visits
|
|
32
|
+
which were part of a DD sequence.
|
|
33
|
+
exclude_dd : `bool`, optional
|
|
34
|
+
Exclude (True) or include (False) visits which are part of a
|
|
35
|
+
DD sequence within this 'area'.
|
|
36
|
+
|
|
37
|
+
Notes
|
|
38
|
+
-----
|
|
39
|
+
This stacker adds an areaId column in the opsim database,
|
|
40
|
+
to be labelled with 'areaIdName' if the visit falls within the
|
|
41
|
+
healpix footprint map and (optionally) is not tagged as a DD visit.
|
|
42
|
+
If it falls outside the footprint, the visit is tagged as "NULL".
|
|
43
|
+
If it was part of a DD sequence, the visit is tagged with an
|
|
44
|
+
ID which is unique to that DD field, if 'exclude_dd' is True.
|
|
45
|
+
Generally this would be likely to be used to tag visits as
|
|
46
|
+
belonging to WFD - but not necessarily!
|
|
47
|
+
Any healpix footprint is valid.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
cols_added = ["area_id"]
|
|
51
|
+
|
|
52
|
+
def __init__(
|
|
53
|
+
self,
|
|
54
|
+
footprint=None,
|
|
55
|
+
fp_threshold=0.4,
|
|
56
|
+
area_id_name="WFD",
|
|
57
|
+
ra_col="fieldRA",
|
|
58
|
+
dec_col="fieldDec",
|
|
59
|
+
note_col="scheduler_note",
|
|
60
|
+
exclude_dd=True,
|
|
61
|
+
):
|
|
62
|
+
self.ra_col = ra_col
|
|
63
|
+
self.dec_col = dec_col
|
|
64
|
+
self.note_col = note_col
|
|
65
|
+
self.cols_req = [self.ra_col, self.dec_col, self.note_col]
|
|
66
|
+
self.cols_added_dtypes = [(str, 15)]
|
|
67
|
+
self.units = [""]
|
|
68
|
+
self.fp_threshold = fp_threshold
|
|
69
|
+
self.area_id_name = area_id_name
|
|
70
|
+
self.exclude_dd = exclude_dd
|
|
71
|
+
if footprint is None:
|
|
72
|
+
# If footprint was not defined,
|
|
73
|
+
# just set it to cover the entire sky, at nside=64
|
|
74
|
+
footprint = np.ones(hp.nside2npix(64))
|
|
75
|
+
self.footprint = footprint
|
|
76
|
+
self.nside = hp.npix2nside(len(self.footprint))
|
|
77
|
+
|
|
78
|
+
def define_ddname(self, note):
|
|
79
|
+
field = note.replace("u,", "")
|
|
80
|
+
field = field.split(",")[0].replace(",", "")
|
|
81
|
+
return field
|
|
82
|
+
|
|
83
|
+
def _run(self, sim_data, cols_present=False):
|
|
84
|
+
# Even if cols_present is true, recalculate.
|
|
85
|
+
# Set up DD names.
|
|
86
|
+
d = set()
|
|
87
|
+
for p in np.unique(sim_data[self.note_col]):
|
|
88
|
+
if p.startswith("DD"):
|
|
89
|
+
d.add(self.define_ddname(p))
|
|
90
|
+
# Identify Healpixels associated with each visit.
|
|
91
|
+
vec = hp.dir2vec(sim_data[self.ra_col], sim_data[self.dec_col], lonlat=True)
|
|
92
|
+
vec = vec.swapaxes(0, 1)
|
|
93
|
+
radius = np.radians(1.75) # fov radius
|
|
94
|
+
area_id = np.zeros(len(sim_data), self.cols_added_dtypes[0])
|
|
95
|
+
for i, (v, note) in enumerate(zip(vec, sim_data[self.note_col])):
|
|
96
|
+
# Identify the healpixels which would be inside this pointing
|
|
97
|
+
pointing_healpix = hp.query_disc(self.nside, v, radius, inclusive=False)
|
|
98
|
+
# The wfd_footprint consists of values of 0/1
|
|
99
|
+
# if out/in WFD footprint
|
|
100
|
+
hp_in_fp = self.footprint[pointing_healpix].sum()
|
|
101
|
+
# So in_fp= the number of healpixels which were in
|
|
102
|
+
# the specified footprint
|
|
103
|
+
# .. in the # in / total # > limit (0.4)
|
|
104
|
+
# then "yes" it's in the footprint
|
|
105
|
+
in_fp = hp_in_fp / len(pointing_healpix)
|
|
106
|
+
if note.startswith("DD") and self.exclude_dd:
|
|
107
|
+
area_id[i] = self.define_ddname(note)
|
|
108
|
+
else:
|
|
109
|
+
if in_fp >= self.fp_threshold:
|
|
110
|
+
area_id[i] = self.area_id_name
|
|
111
|
+
else:
|
|
112
|
+
area_id[i] = "NULL"
|
|
113
|
+
sim_data["area_id"] = area_id
|
|
114
|
+
return sim_data
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
__all__ = ("M5OptimalStacker", "generate_sky_slopes")
|
|
2
|
+
|
|
3
|
+
import numpy as np
|
|
4
|
+
from rubin_scheduler.utils import Site
|
|
5
|
+
|
|
6
|
+
from .base_stacker import BaseStacker
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def generate_sky_slopes():
|
|
10
|
+
"""Fit a line to how the sky brightness changes with airmass."""
|
|
11
|
+
import healpy as hp
|
|
12
|
+
|
|
13
|
+
import rubin_sim.skybrightness as sb
|
|
14
|
+
|
|
15
|
+
sm = sb.SkyModel(mags=True, moon=False, twilight=False, zodiacal=False)
|
|
16
|
+
mjd = 57000
|
|
17
|
+
nside = 32
|
|
18
|
+
airmass_limit = 2.0
|
|
19
|
+
dec, ra = hp.pix2ang(nside, np.arange(hp.nside2npix(nside)))
|
|
20
|
+
dec = np.pi / 2 - dec
|
|
21
|
+
sm.set_ra_dec_mjd(ra, dec, mjd)
|
|
22
|
+
mags = sm.return_mags()
|
|
23
|
+
filters = mags.dtype.names
|
|
24
|
+
filter_slopes = {}
|
|
25
|
+
for filter_name in filters:
|
|
26
|
+
good = np.where((~np.isnan(mags[filter_name])) & (sm.airmass < airmass_limit))
|
|
27
|
+
pf = np.polyfit(sm.airmass[good], mags[filter_name][good], 1)
|
|
28
|
+
filter_slopes[filter_name] = pf[0]
|
|
29
|
+
print(filter_slopes)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class M5OptimalStacker(BaseStacker):
|
|
33
|
+
"""Make a new m5 column as if observations were taken on the meridian.
|
|
34
|
+
If the moon is up, assume sky brightness stays the same.
|
|
35
|
+
|
|
36
|
+
Assumes seeing scales as airmass^0.6. Uses linear fits for sky
|
|
37
|
+
and airmass relation.
|
|
38
|
+
|
|
39
|
+
Parameters
|
|
40
|
+
----------
|
|
41
|
+
airmass_col : `str`
|
|
42
|
+
Column name for the airmass per pointing.
|
|
43
|
+
dec_col : `str`
|
|
44
|
+
Column name for the pointing declination.
|
|
45
|
+
sky_bright_col : `str`
|
|
46
|
+
Column name for the sky brighntess per pointing.
|
|
47
|
+
filter_col : `str`
|
|
48
|
+
Column name for the filter name.
|
|
49
|
+
m5_col : `str`
|
|
50
|
+
Colum name for the five sigma limiting depth per pointing.
|
|
51
|
+
moon_alt_col : `str`
|
|
52
|
+
Column name for the moon altitude per pointing.
|
|
53
|
+
sun_alt_col : `str`
|
|
54
|
+
Column name for the sun altitude column.
|
|
55
|
+
site : `str`
|
|
56
|
+
Name of the site.
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
cols_added = ["m5_optimal"]
|
|
60
|
+
|
|
61
|
+
def __init__(
|
|
62
|
+
self,
|
|
63
|
+
airmass_col="airmass",
|
|
64
|
+
dec_col="fieldDec",
|
|
65
|
+
sky_bright_col="skyBrightness",
|
|
66
|
+
seeing_col="seeingFwhmEff",
|
|
67
|
+
m5_col="fiveSigmaDepth",
|
|
68
|
+
filter_col="filter",
|
|
69
|
+
moon_alt_col="moonAlt",
|
|
70
|
+
sun_alt_col="sunAlt",
|
|
71
|
+
site="LSST",
|
|
72
|
+
):
|
|
73
|
+
self.site = Site(site)
|
|
74
|
+
self.units = ["mags"]
|
|
75
|
+
self.airmass_col = airmass_col
|
|
76
|
+
self.dec_col = dec_col
|
|
77
|
+
self.sky_bright_col = sky_bright_col
|
|
78
|
+
self.seeing_col = seeing_col
|
|
79
|
+
self.filter_col = filter_col
|
|
80
|
+
self.moon_alt_col = moon_alt_col
|
|
81
|
+
self.sun_alt_col = sun_alt_col
|
|
82
|
+
self.m5_col = m5_col
|
|
83
|
+
self.cols_req = [
|
|
84
|
+
airmass_col,
|
|
85
|
+
dec_col,
|
|
86
|
+
sky_bright_col,
|
|
87
|
+
seeing_col,
|
|
88
|
+
filter_col,
|
|
89
|
+
moon_alt_col,
|
|
90
|
+
sun_alt_col,
|
|
91
|
+
]
|
|
92
|
+
self.cols_req = list(set(self.cols_req))
|
|
93
|
+
|
|
94
|
+
def _run(self, sim_data, cols_present=False):
|
|
95
|
+
# k_atm values from rubin_sim.operations gen_output.py
|
|
96
|
+
k_atm = {"u": 0.50, "g": 0.21, "r": 0.13, "i": 0.10, "z": 0.07, "y": 0.18}
|
|
97
|
+
# Linear fits to sky brightness change,
|
|
98
|
+
# no moon, twilight, or zodiacal components
|
|
99
|
+
# Use generate_sky_slopes to regenerate if needed.
|
|
100
|
+
sky_slopes = {
|
|
101
|
+
"g": -0.52611780327408397,
|
|
102
|
+
"i": -0.67898669252082422,
|
|
103
|
+
"r": -0.61378749766766827,
|
|
104
|
+
"u": -0.27840980367303503,
|
|
105
|
+
"y": -0.69635091524779691,
|
|
106
|
+
"z": -0.69652846002009128,
|
|
107
|
+
}
|
|
108
|
+
min_z_possible = np.abs(np.radians(sim_data[self.dec_col]) - self.site.latitude_rad)
|
|
109
|
+
min_airmass_possible = 1.0 / np.cos(min_z_possible)
|
|
110
|
+
for filter_name in np.unique(sim_data[self.filter_col]):
|
|
111
|
+
delta_sky = sky_slopes[filter_name] * (sim_data[self.airmass_col] - min_airmass_possible)
|
|
112
|
+
delta_sky[
|
|
113
|
+
np.where((sim_data[self.moon_alt_col] > 0) | (sim_data[self.sun_alt_col] > np.radians(-18.0)))
|
|
114
|
+
] = 0
|
|
115
|
+
# Using Approximation that FWHM~X^0.6.
|
|
116
|
+
# So seeing term in m5 of: 0.25 * log (7.0/FWHMeff )
|
|
117
|
+
# Goes to 0.15 log(FWHM_min / FWHM_eff) in the difference
|
|
118
|
+
m5_optimal = (
|
|
119
|
+
sim_data[self.m5_col]
|
|
120
|
+
- 0.5 * delta_sky
|
|
121
|
+
- 0.15 * np.log10(min_airmass_possible / sim_data[self.airmass_col])
|
|
122
|
+
- k_atm[filter_name] * (min_airmass_possible - sim_data[self.airmass_col])
|
|
123
|
+
)
|
|
124
|
+
good = np.where(sim_data[self.filter_col] == filter_name)
|
|
125
|
+
sim_data["m5_optimal"][good] = m5_optimal[good]
|
|
126
|
+
return sim_data
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
"""Phase functions for moving objects.
|
|
2
|
+
|
|
3
|
+
Adapted from code written by Michael Kelley - mkelley @ github
|
|
4
|
+
(https://github.com/lsst-sssc/lsstcomet/blob/master/lsstcomet/phase.py)
|
|
5
|
+
[the HalleyMarcus phase curve is entirely from Michael Kelley's code]
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__all__ = ("phase__halley_marcus", "phase__log_linear", "phase_hg")
|
|
9
|
+
|
|
10
|
+
import numpy as np
|
|
11
|
+
from scipy.interpolate import splev, splrep
|
|
12
|
+
|
|
13
|
+
_halley_marcus_phase_curve = splrep(
|
|
14
|
+
np.arange(181),
|
|
15
|
+
np.array(
|
|
16
|
+
[
|
|
17
|
+
1.0000e00,
|
|
18
|
+
9.5960e-01,
|
|
19
|
+
9.2170e-01,
|
|
20
|
+
8.8590e-01,
|
|
21
|
+
8.5220e-01,
|
|
22
|
+
8.2050e-01,
|
|
23
|
+
7.9060e-01,
|
|
24
|
+
7.6240e-01,
|
|
25
|
+
7.3580e-01,
|
|
26
|
+
7.1070e-01,
|
|
27
|
+
6.8710e-01,
|
|
28
|
+
6.6470e-01,
|
|
29
|
+
6.4360e-01,
|
|
30
|
+
6.2370e-01,
|
|
31
|
+
6.0490e-01,
|
|
32
|
+
5.8720e-01,
|
|
33
|
+
5.7040e-01,
|
|
34
|
+
5.5460e-01,
|
|
35
|
+
5.3960e-01,
|
|
36
|
+
5.2550e-01,
|
|
37
|
+
5.1220e-01,
|
|
38
|
+
4.9960e-01,
|
|
39
|
+
4.8770e-01,
|
|
40
|
+
4.7650e-01,
|
|
41
|
+
4.6590e-01,
|
|
42
|
+
4.5590e-01,
|
|
43
|
+
4.4650e-01,
|
|
44
|
+
4.3770e-01,
|
|
45
|
+
4.2930e-01,
|
|
46
|
+
4.2150e-01,
|
|
47
|
+
4.1420e-01,
|
|
48
|
+
4.0730e-01,
|
|
49
|
+
4.0090e-01,
|
|
50
|
+
3.9490e-01,
|
|
51
|
+
3.8930e-01,
|
|
52
|
+
3.8400e-01,
|
|
53
|
+
3.7920e-01,
|
|
54
|
+
3.7470e-01,
|
|
55
|
+
3.7060e-01,
|
|
56
|
+
3.6680e-01,
|
|
57
|
+
3.6340e-01,
|
|
58
|
+
3.6030e-01,
|
|
59
|
+
3.5750e-01,
|
|
60
|
+
3.5400e-01,
|
|
61
|
+
3.5090e-01,
|
|
62
|
+
3.4820e-01,
|
|
63
|
+
3.4580e-01,
|
|
64
|
+
3.4380e-01,
|
|
65
|
+
3.4210e-01,
|
|
66
|
+
3.4070e-01,
|
|
67
|
+
3.3970e-01,
|
|
68
|
+
3.3890e-01,
|
|
69
|
+
3.3850e-01,
|
|
70
|
+
3.3830e-01,
|
|
71
|
+
3.3850e-01,
|
|
72
|
+
3.3890e-01,
|
|
73
|
+
3.3960e-01,
|
|
74
|
+
3.4050e-01,
|
|
75
|
+
3.4180e-01,
|
|
76
|
+
3.4320e-01,
|
|
77
|
+
3.4500e-01,
|
|
78
|
+
3.4700e-01,
|
|
79
|
+
3.4930e-01,
|
|
80
|
+
3.5180e-01,
|
|
81
|
+
3.5460e-01,
|
|
82
|
+
3.5760e-01,
|
|
83
|
+
3.6090e-01,
|
|
84
|
+
3.6450e-01,
|
|
85
|
+
3.6830e-01,
|
|
86
|
+
3.7240e-01,
|
|
87
|
+
3.7680e-01,
|
|
88
|
+
3.8150e-01,
|
|
89
|
+
3.8650e-01,
|
|
90
|
+
3.9170e-01,
|
|
91
|
+
3.9730e-01,
|
|
92
|
+
4.0320e-01,
|
|
93
|
+
4.0940e-01,
|
|
94
|
+
4.1590e-01,
|
|
95
|
+
4.2280e-01,
|
|
96
|
+
4.3000e-01,
|
|
97
|
+
4.3760e-01,
|
|
98
|
+
4.4560e-01,
|
|
99
|
+
4.5400e-01,
|
|
100
|
+
4.6270e-01,
|
|
101
|
+
4.7200e-01,
|
|
102
|
+
4.8160e-01,
|
|
103
|
+
4.9180e-01,
|
|
104
|
+
5.0240e-01,
|
|
105
|
+
5.1360e-01,
|
|
106
|
+
5.2530e-01,
|
|
107
|
+
5.3750e-01,
|
|
108
|
+
5.5040e-01,
|
|
109
|
+
5.6380e-01,
|
|
110
|
+
5.7800e-01,
|
|
111
|
+
5.9280e-01,
|
|
112
|
+
6.0840e-01,
|
|
113
|
+
6.2470e-01,
|
|
114
|
+
6.4190e-01,
|
|
115
|
+
6.5990e-01,
|
|
116
|
+
6.7880e-01,
|
|
117
|
+
6.9870e-01,
|
|
118
|
+
7.1960e-01,
|
|
119
|
+
7.4160e-01,
|
|
120
|
+
7.6480e-01,
|
|
121
|
+
7.8920e-01,
|
|
122
|
+
8.1490e-01,
|
|
123
|
+
8.4200e-01,
|
|
124
|
+
8.7060e-01,
|
|
125
|
+
9.0080e-01,
|
|
126
|
+
9.3270e-01,
|
|
127
|
+
9.6640e-01,
|
|
128
|
+
1.0021e00,
|
|
129
|
+
1.0399e00,
|
|
130
|
+
1.0799e00,
|
|
131
|
+
1.1223e00,
|
|
132
|
+
1.1673e00,
|
|
133
|
+
1.2151e00,
|
|
134
|
+
1.2659e00,
|
|
135
|
+
1.3200e00,
|
|
136
|
+
1.3776e00,
|
|
137
|
+
1.4389e00,
|
|
138
|
+
1.5045e00,
|
|
139
|
+
1.5744e00,
|
|
140
|
+
1.6493e00,
|
|
141
|
+
1.7294e00,
|
|
142
|
+
1.8153e00,
|
|
143
|
+
1.9075e00,
|
|
144
|
+
2.0066e00,
|
|
145
|
+
2.1132e00,
|
|
146
|
+
2.2281e00,
|
|
147
|
+
2.3521e00,
|
|
148
|
+
2.4861e00,
|
|
149
|
+
2.6312e00,
|
|
150
|
+
2.7884e00,
|
|
151
|
+
2.9592e00,
|
|
152
|
+
3.1450e00,
|
|
153
|
+
3.3474e00,
|
|
154
|
+
3.5685e00,
|
|
155
|
+
3.8104e00,
|
|
156
|
+
4.0755e00,
|
|
157
|
+
4.3669e00,
|
|
158
|
+
4.6877e00,
|
|
159
|
+
5.0418e00,
|
|
160
|
+
5.4336e00,
|
|
161
|
+
5.8682e00,
|
|
162
|
+
6.3518e00,
|
|
163
|
+
6.8912e00,
|
|
164
|
+
7.4948e00,
|
|
165
|
+
8.1724e00,
|
|
166
|
+
8.9355e00,
|
|
167
|
+
9.7981e00,
|
|
168
|
+
1.0777e01,
|
|
169
|
+
1.1891e01,
|
|
170
|
+
1.3166e01,
|
|
171
|
+
1.4631e01,
|
|
172
|
+
1.6322e01,
|
|
173
|
+
1.8283e01,
|
|
174
|
+
2.0570e01,
|
|
175
|
+
2.3252e01,
|
|
176
|
+
2.6418e01,
|
|
177
|
+
3.0177e01,
|
|
178
|
+
3.4672e01,
|
|
179
|
+
4.0086e01,
|
|
180
|
+
4.6659e01,
|
|
181
|
+
5.4704e01,
|
|
182
|
+
6.4637e01,
|
|
183
|
+
7.7015e01,
|
|
184
|
+
9.2587e01,
|
|
185
|
+
1.1237e02,
|
|
186
|
+
1.3775e02,
|
|
187
|
+
1.7060e02,
|
|
188
|
+
2.1348e02,
|
|
189
|
+
2.6973e02,
|
|
190
|
+
3.4359e02,
|
|
191
|
+
4.3989e02,
|
|
192
|
+
5.6292e02,
|
|
193
|
+
7.1363e02,
|
|
194
|
+
8.8448e02,
|
|
195
|
+
1.0533e03,
|
|
196
|
+
1.1822e03,
|
|
197
|
+
1.2312e03,
|
|
198
|
+
]
|
|
199
|
+
),
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
def phase__halley_marcus(phase):
|
|
204
|
+
"""Halley-Marcus composite dust phase function.
|
|
205
|
+
This is appropriate for use when calculating the brightness of
|
|
206
|
+
cometary coma.
|
|
207
|
+
|
|
208
|
+
Parameters
|
|
209
|
+
----------
|
|
210
|
+
phase : float or array
|
|
211
|
+
Phase angle (degrees).
|
|
212
|
+
|
|
213
|
+
Returns
|
|
214
|
+
-------
|
|
215
|
+
phi : float or array
|
|
216
|
+
Phase function evaluated at ``phase``.
|
|
217
|
+
|
|
218
|
+
"""
|
|
219
|
+
return splev(phase, _halley_marcus_phase_curve)
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
def phase__log_linear(phase, slope=0.04):
|
|
223
|
+
"""A logLinear phase function, roughly appropriate for cometary nuclei.
|
|
224
|
+
An H-G phase function is likely a better approximation.
|
|
225
|
+
|
|
226
|
+
Parameters
|
|
227
|
+
----------
|
|
228
|
+
phase : float or array
|
|
229
|
+
Phase angle (degrees)
|
|
230
|
+
slope : float, optional
|
|
231
|
+
The slope for the phase function. Default 0.04.
|
|
232
|
+
|
|
233
|
+
Returns
|
|
234
|
+
-------
|
|
235
|
+
phi : float or array
|
|
236
|
+
Phase function evaluated at phase
|
|
237
|
+
"""
|
|
238
|
+
return 10 ** (-0.4 * slope * phase)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def phase_hg(phase, G=0.15):
|
|
242
|
+
"""The Bowell et al 1989 (Asteroids II) HG phase curve.
|
|
243
|
+
https://ui.adsabs.harvard.edu/abs/1989aste.conf..524B/abstract
|
|
244
|
+
|
|
245
|
+
Parameters
|
|
246
|
+
----------
|
|
247
|
+
phase : float or array
|
|
248
|
+
Phase angle (degrees)
|
|
249
|
+
G : float, optional
|
|
250
|
+
The G value for the formula. Default 0.15.
|
|
251
|
+
|
|
252
|
+
Returns
|
|
253
|
+
-------
|
|
254
|
+
phi : float or array
|
|
255
|
+
Phase function evaluated at phase
|
|
256
|
+
"""
|
|
257
|
+
# see Muinonen et al 2010, eqn 6
|
|
258
|
+
# (http://dx.doi.org/10.1016/j.icarus.2010.04.003)
|
|
259
|
+
phi1 = np.exp(-3.33 * np.power(np.tan(np.radians(phase) / 2), 0.63))
|
|
260
|
+
phi2 = np.exp(-1.87 * np.power(np.tan(np.radians(phase) / 2), 1.22))
|
|
261
|
+
return (1 - G) * phi1 + G * phi2
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
def phase_hg12(phase, g12=0.1):
|
|
265
|
+
pass
|