Skip to content

Commit

Permalink
Merge branch 'master' of github.com:superbit-collaboration/superbit-m…
Browse files Browse the repository at this point in the history
…etacal
  • Loading branch information
sweverett committed Sep 22, 2022
2 parents c98d901 + 592c106 commit 968e244
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
52 changes: 52 additions & 0 deletions configs/gauss-uberseg-gs.yaml
Original file line number Diff line number Diff line change
@@ -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: 'gauss_uberseg' # 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

13 changes: 13 additions & 0 deletions configs/gauss-uberseg-meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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: True
overwrite: True
master_seed: 4681084119

0 comments on commit 968e244

Please # to comment.