Skip to content

DavidNavarroG/bcnz

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

757 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bcnz

The BCNz photo-z code described in Eriksen 2019. Support for the Bayesian extension Alarcon 2020 is pending.

The code performs the following steps:

  • Create the model.
  • Calibration.
  • Run the photo-z.

Installation

Clone the respository and write

pip install -e .

after entering into the cloned directory.

Running over a galaxy catalgue.

While intended to be integrated in PAUdm, one can also run the code from the command line. As an example, one can run

./run_bcnz.py /data/astro/scratch/eriksen/output/bcnz/v5_941 /data/astro/scratch/eriksen/cache/bcnz/11 941 w3 --ip_dask=tcp://193.109.175.131:45560

where bcnz_paudm.py is a binary in the bcnz/bin directory. Here the photo-z code will run the code over MEMBA production 941, which is in the W3 field. Intermediate and final outputs are stored in the

/data/astro/scratch/eriksen/output/bcnz/v5_941

directory. Further, computing the models are time consuming. If not already existing, they will be calculated and stored in

/data/astro/scratch/eriksen/cache/bcnz/2.

For running in parallel, the code uses Dask. By specifying Dask, one can run on an existing Dask cluster. For example, dask-jobqueue supports running Dask on HTCondor, which is used at the PIC data center.

Other usages.

The BCNz2 code include different modules which can be used directly. For example,

all_filters = bcnz.model.all_filters()

would give a Pandas dataframe with all the filter transmission curves. Connecting to the PAUdm database can be done using:

conn = bcnz.connect_db()

For seeing the emission line ratios used:

bcnz.model.line_ratios()

##BCNz on mock catalogues: The bcnz_externalfile.p implements BCNz on galaxy mocks. An example of command line to run on mocks is:

./bcnz_externalfile.py /data/astro/scratch/lcabayol/pmillenium/test_cat_bcnz.csv /data/astro/scratch/lcabayol/pmillenium/zcats /data/astro/scratch/eriksen/cache/bcnz/11 --bbnames=['U','B','V','R','I','ZN']

The first argument is the path to the catalogue. This needs to contain the narrow-band fluxes in PAUS units named as NBXXX (e.g. NB455) and the broad bands. The broad-band naming needs to be specified in the argument --bbnames.

The second argument is the path to the output directory. The third argument is the path to the models.

Running the calbration is an option. By default, it is disabled, but it can be enabled by adding --calib=True in the command line.

Running using dask paralelisation is also possible specifying the ip_dask in the command line.

Acknowledgement

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under the grant agreement No 776247 EWC.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%