Skip to content

Commit

Permalink
WL binned likelihood object (#77)
Browse files Browse the repository at this point in the history
* New method for likelihood utilizing KDE
* Added necessary support to compute the galaxy wl likelihood using KDE. Fixed leak in nc_galaxy_wl.
* Cut galaxies with e,g < 0, e,g > 0.05
* First working version of the KDE likelihood for WL.
* Fixed behavior for g_i < 0
* Better control of the border in the galaxy KDE.
* Renamed reduced shear to ellipticity to focus on the true weak lensing observable. Created new object class nc_galaxy_wl_ellipticity_kde and moved calculations from nc_galxy_wl to nc_galaxy_wl_ellipticity_kde. Introduced new method nc_galaxy_wl_dist_m2lnP_initial_prep. Edited Makefile.am, Makefile.in, ncm_cfg.c and numcosmo.h to accomodate changes. Changes have made calculations slower but results seem to be in line with previous version.
* Freeing s_kde and g_vec on _nc_galaxy_wl_dist_initial_prep seems to have fixed memory leak (?) issue on last commit
* Fix's fix. Freeing the memory allocated to s_kde and g_vec is what was initially causing the segmentation fault.
* Fixed indentation.
* Removed comments and added doc.
* Reorganizing internal of nc_galaxy_wl_ellipticity_kde. Indentation on other related objects.
* Fixed email and unnecessary variable.
* Fixed object names on docs.
* Fixed numcosmo/lss/nc_galaxy_wl_ellipticity_kde.c bug. When resetting self->kde, epdf_bw_type stayed as FIXED instead of being recast as RoT.
* First attempt at creating binned object for wl likelihood. Currently working on creating a NcmObjArray with the galaxy data belonging to each bin. Probably (certainly) very buggy.
* First version of unit test for nc_galaxy_wl_ellipticity_kde.
* Added lss/nc_galaxy_wl_ellipticity_kde to numcosmo.h and math/ncm_cfg.c
* Removed old code necessary for debugging.
* Fixed copyright notice, fixed reset of self->e_vec, added peek_kde and peek_e_vec methods.
* Fixed file name when adding tests, fixed nc_distance_comoving error by preparing dist object, reduced number of tests.
* Registered new object NcGalaxyWLEllipticityBinned
* Changed approach to binning, fixed set_bin_obs, object is now compiling
* Finished binned weak lensing object prototype
* Started implementation of unit test for wl_ellipticity_binned, setting gebin->binobs as NcmObjArray on initialization.
* Fixed binning behaviour. Bug was caused by casting bin limits as an int instead of a float. Tests are all passing now.
* Update nc_galaxy_wl.c
* Fixed copyright notices

---------

Co-authored-by: Sandro Dias Pinto Vitenti <vitenti@uel.br>
Co-authored-by: Caio Lima de Oliveira <caiolimadeoliveira@proton.me>
  • Loading branch information
3 people committed Mar 19, 2023
1 parent ac4bb4e commit 26493b8
Show file tree
Hide file tree
Showing 13 changed files with 746 additions and 67 deletions.
2 changes: 2 additions & 0 deletions numcosmo/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ nc_headers = \
lss/nc_galaxy_wl_dist.h \
lss/nc_galaxy_wl_ellipticity_gauss.h \
lss/nc_galaxy_wl_ellipticity_kde.h \
lss/nc_galaxy_wl_ellipticity_binned.h \
lss/nc_galaxy_wl_proj.h \
lss/nc_cor_cluster_cmb_lens_limber.h \
lss/nc_wl_surface_mass_density.h \
Expand Down Expand Up @@ -591,6 +592,7 @@ nc_sources = \
lss/nc_galaxy_wl_dist.c \
lss/nc_galaxy_wl_ellipticity_gauss.c \
lss/nc_galaxy_wl_ellipticity_kde.c \
lss/nc_galaxy_wl_ellipticity_binned.c \
lss/nc_galaxy_wl_proj.c \
lss/nc_cor_cluster_cmb_lens_limber.c \
lss/nc_wl_surface_mass_density.c \
Expand Down
9 changes: 5 additions & 4 deletions numcosmo/lss/nc_galaxy_wl.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
* nc_galaxy_wl.c
*
* Mon July 27 11:12:53 2020
* Copyright 2020 Sandro Dias Pinto Vitenti & Mariana Penna Lima
* <vitenti@uel.br>, <pennalima@gmail.com>
* Copyright 2023 Sandro Dias Pinto Vitenti & Mariana Penna Lima & Caio Lima de Oliveira
* <vitenti@uel.br>, <pennalima@gmail.com>, <caiolimadeoliveira@pm.me>
****************************************************************************/
/*
* nc_galaxy_wl.c
* Copyright (C) 2020 Sandro Dias Pinto Vitenti <vitenti@uel.br>
* Copyright (C) 2020 Mariana Penna Lima <pennalima@gmail.com>
* Copyright (C) 2023 Sandro Dias Pinto Vitenti <vitenti@uel.br>
* Copyright (C) 2023 Mariana Penna Lima <pennalima@gmail.com>
* Copyright (C) 2023 Caio Lima de Oliveira <caiolimadeoliveira@pm.me>
*
* numcosmo is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
Expand Down
9 changes: 5 additions & 4 deletions numcosmo/lss/nc_galaxy_wl_dist.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
* nc_galaxy_wl_dist.c
*
* Mon July 27 11:12:53 2020
* Copyright 2020 Sandro Dias Pinto Vitenti & Mariana Penna Lima
* <vitenti@uel.br>, <pennalima@gmail.com>
* Copyright 2023 Sandro Dias Pinto Vitenti & Mariana Penna Lima & Caio Lima de Oliveira
* <vitenti@uel.br>, <pennalima@gmail.com>, <caiolimadeoliveira@pm.me>
****************************************************************************/
/*
* nc_galaxy_wl_dist.c
* Copyright (C) 2020 Sandro Dias Pinto Vitenti <vitenti@uel.br>
* Copyright (C) 2020 Mariana Penna Lima <pennalima@gmail.com>
* Copyright (C) 2023 Sandro Dias Pinto Vitenti <vitenti@uel.br>
* Copyright (C) 2023 Mariana Penna Lima <pennalima@gmail.com>
* Copyright (C) 2023 Caio Lima de Oliveira <caiolimadeoliveira@pm.me>
*
* numcosmo is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
Expand Down
9 changes: 5 additions & 4 deletions numcosmo/lss/nc_galaxy_wl_dist.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
* nc_galaxy_wl_dist.h
*
* Mon July 27 11:13:56 2020
* Copyright 2020 Sandro Dias Pinto Vitenti & Mariana Penna Lima
* <vitenti@uel.br>, <pennalima@gmail.com>
* Copyright 2023 Sandro Dias Pinto Vitenti & Mariana Penna Lima & Caio Lima de Oliveira
* <vitenti@uel.br>, <pennalima@gmail.com>, <caiolimadeoliveira@pm.me>
****************************************************************************/
/*
* nc_galaxy_wl_dist.h
* Copyright (C) 2020 Sandro Dias Pinto Vitenti <vitenti@uel.br>
* Copyright (C) 2020 Mariana Penna Lima <pennalima@gmail.com>
* Copyright (C) 2023 Sandro Dias Pinto Vitenti <vitenti@uel.br>
* Copyright (C) 2023 Mariana Penna Lima <pennalima@gmail.com>
* Copyright (C) 2023 Caio Lima de Oliveira <caiolimadeoliveira@pm.me>
*
* numcosmo is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
Expand Down

0 comments on commit 26493b8

Please sign in to comment.