:py:mod:`cosmodc2_raytracer` ============================ .. py:module:: cosmodc2_raytracer .. autoapi-nested-parse:: Raytracing module for CosmoDC2 Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: cosmodc2_raytracer.CosmoDC2Raytracer .. py:class:: CosmoDC2Raytracer(in_dir, out_dir, fov, n_kappa_samples, healpix, seed, approx_z_src=2.0, mass_cut=11, n_sightlines=1000, kappa_sampling_dir=None, debug=False) Bases: :py:obj:`n2j.trainval_data.raytracers.base_raytracer.BaseRaytracer` Raytracing tool for postprocessing the lensing distortion in CosmoDC2 .. py:attribute:: NSIDE :value: 32 .. py:attribute:: LENSING_NSIDE :value: 4096 .. py:attribute:: KAPPA_DIFF :value: 1.0 .. py:attribute:: COLUMN_NAMING .. py:attribute:: TO_200C :value: 0.85 .. py:method:: _set_column_names() Set column names to be stored .. py:method:: get_pointings_iterator(columns=None, chunksize=100000) Get an iterator over the galaxy catalog defining the pointings .. py:method:: get_halos_iterator(columns=None, chunksize=100000) Get an iterator over the halo catalog defining our line-of-sight halos .. py:method:: _get_pointings() Gather pointings defining our sightlines .. py:method:: _get_pointings_on_grid(dist_thres) Get the pointings on a grid of healpixes Parameters ---------- dist_thres : float matching threshold between gridpoints and halo positions, in deg Notes ----- Currently takes 1.2 min for 1000 sightlines. Doesn't have to be so rigorous about finding sightlines closest to grid. Two requirements are that sightlines need to be dominated by cosmic variance (span a few degrees) and that each sightline has a galaxy. .. py:method:: get_los_halos(i, ra_los, dec_los, z_src, galaxy_id_los) Compile halos in the line of sight of a given galaxy .. py:method:: single_raytrace(i) Raytrace through a single sightline .. py:method:: sample_kappas(i, lens_model, halos) Render the halos in uniformly random locations within the aperture to sample the kappas. The mean of sampled kappas will be used as an estimate of the additional average kappa contribution of our halos .. py:method:: parallel_raytrace(n_cores) Raytrace through multiple sightlines in parallel