Skip to content

Commit

Permalink
Merge pull request #14 from mr-superonion/force_measure
Browse files Browse the repository at this point in the history
Enable DM task being run on simulations
  • Loading branch information
mr-superonion authored Dec 12, 2024
2 parents 8478615 + 3454372 commit 2d94baa
Show file tree
Hide file tree
Showing 60 changed files with 3,064 additions and 970 deletions.
10 changes: 0 additions & 10 deletions .copier-answers.yml

This file was deleted.

96 changes: 59 additions & 37 deletions examples/anacal/example_blended_sim.ipynb

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions examples/anacal_dm/hsc/README.md

This file was deleted.

84 changes: 0 additions & 84 deletions examples/anacal_dm/hsc/shear_config.yaml

This file was deleted.

29 changes: 29 additions & 0 deletions examples/anacal_dm/hsc_calibration/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Setup Butler
```
sh ./butler_setup.sh
```

# Run with bps (in torque system)
```
bps submit bps_torque.yaml
```

# Run Locally
```
pipetask run -b ./ -j 1 -i skymaps -o sim -p ./shear_config.yaml -d "skymap='hsc_sim' AND tract=0 AND patch in (0) AND band in ('g', 'r', 'i', 'z', 'y')" --register-dataset-types --skip-existing --clobber-outputs
```


# Shear Distortion Mode


Note that there are three options in each redshift bin
+ 0: g=-0.02;
+ 1: g=0.02;
+ 2: g=0.00

For example, number of redshift bins is 4, (nz_bins = [0., 0.5, 1.0, 1.5,
2.0]), if mode = 7 which in ternary is "0021" --- meaning that the shear is
(-0.02, -0.02, 0.00, 0.02) in each bin, respectively.

File renamed without changes.
File renamed without changes.
File renamed without changes.
134 changes: 134 additions & 0 deletions examples/anacal_dm/hsc_calibration/shear_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
description: The pipeline specialized for testing image simulation.
instrument: lsst.obs.subaru.HyperSuprimeCam

tasks:
MutibandSim1:
class: xlens.sim_pipe.multibandSim.MultibandSimShearPipe
config:
simulator.survey_name: hsc
simulator.mode: 0
simulator.irot: 0
connections.mode: 0
connections.irot: 0

MutibandSim2:
class: xlens.sim_pipe.multibandSim.MultibandSimShearPipe
config:
simulator.survey_name: hsc
simulator.mode: 0
simulator.irot: 1
connections.mode: 0
connections.irot: 1

MutibandSim3:
class: xlens.sim_pipe.multibandSim.MultibandSimShearPipe
config:
simulator.survey_name: hsc
simulator.mode: 1
simulator.irot: 0
connections.mode: 1
connections.irot: 0

MutibandSim4:
class: xlens.sim_pipe.multibandSim.MultibandSimShearPipe
config:
simulator.survey_name: hsc
simulator.mode: 1
simulator.irot: 1
connections.mode: 1
connections.irot: 1

DetectTask1:
class: xlens.process_pipe.fpfs_joint.FpfsJointPipe
config:
do_dm_detection: False
fpfs.use_average_psf: True
fpfs.do_adding_noise: False
connections.coaddName: sim_0_rot0_

DetectTask2:
class: xlens.process_pipe.fpfs_joint.FpfsJointPipe
config:
do_dm_detection: False
fpfs.use_average_psf: True
fpfs.do_adding_noise: False
connections.coaddName: sim_0_rot1_

DetectTask3:
class: xlens.process_pipe.fpfs_joint.FpfsJointPipe
config:
do_dm_detection: False
fpfs.use_average_psf: True
fpfs.do_adding_noise: False
connections.coaddName: sim_1_rot0_

DetectTask4:
class: xlens.process_pipe.fpfs_joint.FpfsJointPipe
config:
do_dm_detection: False
fpfs.use_average_psf: True
fpfs.do_adding_noise: False
connections.coaddName: sim_1_rot1_

ForceTask1:
class: xlens.process_pipe.fpfs_force.FpfsForcePipe
config:
fpfs.sigma_arcsec1: 0.52
fpfs.use_average_psf: True
fpfs.do_adding_noise: False
connections.coaddName: sim_0_rot0_

ForceTask2:
class: xlens.process_pipe.fpfs_force.FpfsForcePipe
config:
fpfs.sigma_arcsec1: 0.52
fpfs.use_average_psf: True
fpfs.do_adding_noise: False
connections.coaddName: sim_0_rot1_

ForceTask3:
class: xlens.process_pipe.fpfs_force.FpfsForcePipe
config:
fpfs.sigma_arcsec1: 0.52
fpfs.use_average_psf: True
fpfs.do_adding_noise: False
connections.coaddName: sim_1_rot0_

ForceTask4:
class: xlens.process_pipe.fpfs_force.FpfsForcePipe
config:
fpfs.sigma_arcsec1: 0.52
fpfs.use_average_psf: True
fpfs.do_adding_noise: False
connections.coaddName: sim_1_rot1_

SelectBiasTask:
class: xlens.summary_pipe.selbias_m00_multiband.SelBiasMultibandPipe
config:
shape_name: "i_fpfs1_e1"
m00_name: "i_fpfs1_m00"
do_correct_selection_bias: True
connections.dataType: force
connections.coaddName: sim

Summary:
class: xlens.summary_pipe.selbias_m00_multiband.SelBiasSummaryMultibandPipe
config:
connections.dataType: force
connections.coaddName: sim

# SelectBiasTaskRanforest:
# class: xlens.summary_pipe.selbias_ranforest_multiband.SelBiasRfMultibandPipe
# config:
# shape_name: "i_fpfs1_e1"
# do_correct_selection_bias: True
# mag_zero: 27.0
# connections.dataType: force
# connections.coaddName: sim
# model_name: simple_sim_RF.pkl # need to use absolute dir if run with bps

# SummaryRanForest:
# class: xlens.summary_pipe.selbias_ranforest_multiband.SelBiasRfSummaryMultibandPipe
# config:
# connections.dataType: force
# connections.coaddName: sim
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
config.skyMap["discrete"].decList = [41.269] # degrees
config.skyMap["discrete"].radiusList = [5.0] # degrees
config.skyMap["discrete"].pixelScale = 0.168 # HSC arcsec/pixel
config.skyMap["discrete"].patchInnerDimensions = [5000, 5000] # in pixels
config.skyMap["discrete"].patchInnerDimensions = [500, 500] # in pixels # change it to [5000, 5000]
config.skyMap["discrete"].projection = "TAN"
config.skyMap["discrete"].tractOverlap = 0
config.name = "hsc_sim"
35 changes: 0 additions & 35 deletions examples/anacal_dm/lsst/bps_slurm.yaml

This file was deleted.

53 changes: 0 additions & 53 deletions examples/anacal_dm/lsst/halo_config.yaml

This file was deleted.

Loading

0 comments on commit 2d94baa

Please sign in to comment.