Skip to content

validation -> extract info #153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ Validation of weak-lensing catalogues (galaxy and star shapes and other paramete
| [![coc](https://img.shields.io/badge/conduct-read-lightgrey)](https://github.com/martin.kilbinger/sp_validation/blob/master/CODE_OF_CONDUCT.md) | [![Updates](https://pyup.io/repos/github/martin.kilbinger/sp_validation/shield.svg)](https://pyup.io/repos/github/martin.kilbinger/sp_validation/) | |

---
> Authors: <a href="www.cosmostat.org" target="_blank" style="text-decoration:none; color: #F08080">CosmoStat</a> lab at CEA Paris-Saclay, including:
Axel Guinot, Martin Kilbinger, Lucie Baumont, Sacha Guerrini, Fabian Hervas Peters, Samuel Farrens, Emma Ayçoberry.</a>
> Authors: <a href="www.cosmostat.org" target="_blank" style="text-decoration:none; color: #F08080">CosmoStat</a> lab at CEA Paris-Saclay;
Martin Kilbinger, Axel Guinot.
> Contributors: Emma Ayçoberry, Lucie Baumont, Clara Bonini, Cale Daley, Samuel Farrens, Sacha Guerrini, Fabian Hervas Peters.</a>
> Email: <a href="mailto:[email protected]" style="text-decoration:none; color: #F08080">[email protected]</a>
---

Expand All @@ -33,9 +34,17 @@ tasks that can be performed by `sp_validation` are:
correlation function.


## Flow chart

The following flow chart illustrates the steps required to go from ShapePipe output products
to calibrated and well-selected galaxy catalogues.

![Flow chart](docs/images/flow_chart.png)


## Run shear validation

See the [documentation](docs/source/run_validation.md) for instructions how to set up and run `sp_validation`.
See the [documentation](docs/source/run_validation.md) for instructions on how to set up and run `sp_validation`.


## Post processing
Expand Down
Binary file added docs/images/flow_chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 10 additions & 45 deletions docs/source/run_validation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
## Shear validation
## Extract shear information

### Set up a shear validation run
(<= SP v1.4.1: Formerly known as shapepipe validation.)

This step extracts the relevant information from the merged final_cat hdf5 catalogue (<= v1.4.1: fits)
including the sheared values for metacalibration.

### Set up

All inputs and settings are contained in the python configuration script
`notebooks/params.py`, that needs to be edited accordingly.
Expand All @@ -24,46 +29,6 @@ See the script `prepare_patch_for_spval.sh` for an example of copying
the required input files to where the validation is to be run.


### Run shear validation

There are two possibilities to carry out the shear validation, by running the jupyter notebooks
in `jupyter-lab`, or by running a python script in the command line via `ipython`.

#### Running the jupyter notebooks

1. In the run directory start JupyterLab:
```bash
jupyer-lab
```

2. Load and run first notebook `main_set_up.ipynb`:
1. Double-click in file manager tab on the left.
2. Run notebook.

3. Run all further notebooks:
1. Double-click as above.
2. Change kernel to `main_set_up.ipynb`:
Either via the menu `Kernel -> Change Kernel` or
by clicking on `Python 3` on the top left of the notebook.
3. Run notebook.

Run the notebooks in the following order:
1. `main_set_up.ipynb` (main notebook)
2. `metacal_global.ipynb`
3. [`metacal_local.ipynb`] optional
4. `psf_leakage.ipynb`
5. `write_cat.ipynb`
6. `maps.ipynb`
7. `cosmology.ipynb`

#### Running the python script

1. Create the python script from the jupyter notbooks. In `notebooks`:
```bash
python config_convert.py
```

2. Run python script. In run directory:
```bash
ipython /path/to/sp_validation/notebooks/validation.py
```
### Run

Run the jupyter notebook `extract_information.ipynb` or python script `extract_information.py`.
Loading