From ff0f10fb255e75856a55ba9025344e73a821c2c5 Mon Sep 17 00:00:00 2001 From: mcclearyj Date: Fri, 16 Sep 2022 18:18:58 -0400 Subject: [PATCH 1/3] add default gauss-uberseg run meta- and galsim configs --- configs/gauss-uberseg-gs.yaml | 52 +++++++++++++++++++++++++++++++++ configs/gauss-uberseg-meta.yaml | 13 +++++++++ 2 files changed, 65 insertions(+) create mode 100644 configs/gauss-uberseg-gs.yaml create mode 100644 configs/gauss-uberseg-meta.yaml diff --git a/configs/gauss-uberseg-gs.yaml b/configs/gauss-uberseg-gs.yaml new file mode 100644 index 00000000..8545bb17 --- /dev/null +++ b/configs/gauss-uberseg-gs.yaml @@ -0,0 +1,52 @@ +# SuperBIT parameters +# ------------------- +pixel_scale: 0.141 # Pixel scale [arcsec/px] +gain: 0.343 # Camera gain [e- / ADU] +read_noise: 1.8 # Read noise [e-] +dark_current: 0.0022 # mean dark current [ADU / px / s] +dark_current_std: 0.001 # standard deviation dark current [ADU /px / s] +image_xsize: 9568 # Horizontal image size [px] +image_ysize: 6380 # Vertical image size [px] +exp_time: 600 # Exposure time per image [s] +tel_diam: 0.5 # Telescope aperture diameter [m] +# Define strut parameters. BIT has four orthogonal struts that +# are ~12mm wide, and the exit pupil diameter is 137.4549 mm (Zemax) +nstruts: 4 # Number of M2 struts [] +strut_thick: 0.087 # Fraction of diameter strut thickness [m/m] +strut_theta: 90 # Angle between vertical and nearest [deg] +obscuration: 0.380 # Fraction of aperture obscured by M2 [] + + +# Simulated image parameters +# -------------------------- +center_ra: 13.3 # Central Right Ascension [hrs] +center_dec: 33.1 # Central Declination [deg] +sky_bkg: 0.0519 # mean sky background from AG's paper [ADU / s / px] +sky_sigma: 0.06 # standard deviation of sky background [ADU / s / px] +nobj: 34300 # Number of galaxies (COSMOS 25.2 depth) [] +nstars: # Number of stars in the field [] +nexp: 18 # Number of exposures per PSF model [] +nclustergal: 30 # Number of cluster galaxies (arbitrary) [] +bandpass: 'crates_b' # Catalog filter name for simulation [] +jitter_fwhm: 0.24 # Kernel size of SuperBIT jitter [arcsec] +use_optics: False # Add optics model to PSF? (default: True) [True/False] +run_name: 'pipe_test' # Root for exposure name creation [] + +# Simulated cluster parameters +# ---------------------------- +lam: 475 # Fiducial wavelength for abberations [nm] +nfw_conc: 4 # Concentration parameter = virial radius / NFW scale radius +omega_m: 0.3 # Omega matter for the background cosmology [] +omega_lam: 0.7 # Omega lambda for the background cosmology [] + +# Run parameters +# -------------- +# Define some paths and filenames +cosmosdir: # Path to COSMOS data directory +datadir: # Path to repo/GalSim data directory +cat_file_name: 'cosmos15_superbit2023_phot_shapes.csv' # catalog file name for COSMOS (in cosmosdir) +cluster_cat_name: 'real_galaxy_catalog_23.5_example.fits' # path to cluster catalog +outdir: # directory where output images and truth catalogs are saved +gaia_dir: # Path to GAIA star catalog directory +sample_gaia_cats: True + diff --git a/configs/gauss-uberseg-meta.yaml b/configs/gauss-uberseg-meta.yaml new file mode 100644 index 00000000..927248bf --- /dev/null +++ b/configs/gauss-uberseg-meta.yaml @@ -0,0 +1,13 @@ +run_name: 'gauss-ubserseg' +base_dir: +nfw_dir: +gs_base_config: 'gauss-uberseg-gs.yaml' +mass_bins: [2.5e14, 4.1e14, 5.8e14, 7.8e14, 1.6e15] # Msol / h; must have decimal! +z_bins: [0.075, 0.25, 0.45] +realizations: 30 +ncores_per_job: 48 +memory_per_job: 64 +vb: False +run_diagnostics: False +overwrite: True +master_seed: 4681084119 \ No newline at end of file From 222536f752a6eb7d313861aaad35ad5065b50ab4 Mon Sep 17 00:00:00 2001 From: Spencer W Everett Date: Fri, 16 Sep 2022 15:40:17 -0700 Subject: [PATCH 2/3] Updated `gauss_uberseg` configs --- configs/gauss-uberseg-gs.yaml | 2 +- configs/gauss-uberseg-meta.yaml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/configs/gauss-uberseg-gs.yaml b/configs/gauss-uberseg-gs.yaml index 8545bb17..fd6ab5ff 100644 --- a/configs/gauss-uberseg-gs.yaml +++ b/configs/gauss-uberseg-gs.yaml @@ -30,7 +30,7 @@ nclustergal: 30 # Number of cluster galaxies (arbitrary) [] bandpass: 'crates_b' # Catalog filter name for simulation [] jitter_fwhm: 0.24 # Kernel size of SuperBIT jitter [arcsec] use_optics: False # Add optics model to PSF? (default: True) [True/False] -run_name: 'pipe_test' # Root for exposure name creation [] +run_name: 'gauss_uberseg' # Root for exposure name creation [] # Simulated cluster parameters # ---------------------------- diff --git a/configs/gauss-uberseg-meta.yaml b/configs/gauss-uberseg-meta.yaml index 927248bf..87641550 100644 --- a/configs/gauss-uberseg-meta.yaml +++ b/configs/gauss-uberseg-meta.yaml @@ -1,13 +1,13 @@ -run_name: 'gauss-ubserseg' -base_dir: -nfw_dir: -gs_base_config: 'gauss-uberseg-gs.yaml' +run_name: 'gauss_uberseg' +base_dir: '/projects/superbit/repos/superbit-metacal/runs/gauss_uberseg/' +nfw_dir: '/projects/superbit/repos/superbit-metacal/runs/nfw_truth/' +gs_base_config: '/projects/superbit/repos/superbit-metacal/configs/gauss-uberseg-gs.yaml' mass_bins: [2.5e14, 4.1e14, 5.8e14, 7.8e14, 1.6e15] # Msol / h; must have decimal! z_bins: [0.075, 0.25, 0.45] realizations: 30 ncores_per_job: 48 memory_per_job: 64 vb: False -run_diagnostics: False +run_diagnostics: True overwrite: True -master_seed: 4681084119 \ No newline at end of file +master_seed: 4681084119 From 592c106d1227e9891a57ceb72cd987615bbf2ab4 Mon Sep 17 00:00:00 2001 From: Spencer Everett Date: Fri, 16 Sep 2022 15:45:34 -0700 Subject: [PATCH 3/3] Update README.md Signed-off-by: Spencer Everett --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index fdbaf8cb..71f4216b 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,31 @@ The example configuration file is shown in `configs/pipe_test.yaml`. An example The available config options for each submodule are defined in the various module classes in `superbit_lensing.pipe.py`, such as `GalSimModule`. The required & optional fields are given in `_req_fields` and `_opt_fields` respectively. The pipeline runner tells you if you fail to pass a required field or if you pass something that it doesn't understand. +## To build a specific run environment +Create env from yaml (e.g. `env_v1.3.9.yaml`): + +`conda env create --name sbmcal_139 --file env_v1.3.9.yaml` + +Activate new env: + +`conda activate sbmcal_139` + +cd to meds repo: + +`cd /path/to/repos/meds` + +Build it: + +`python setup.py install` + +cd to this repo: + +`cd /path/to/repos/superbit-metacal` + +pip install repo: + +`pip install -e /path/to/repos/superbit-metacal` + ## For the experts If you want to add a new submodule to the pipeline, simply define a new subclass `MyCustomModule(SuperBITModule)` that implements the abstract `run()` function of the parent class and add it to `pipe.MODULE_TYPES` to register it with the rest of the pipeline. You should also implement the desired required & optional parameters that can be present in the module config with the class variables `_req_fields` and `_opt_fields`, which should be lists.