-
Notifications
You must be signed in to change notification settings - Fork 3
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
Update modules #27
Update modules #27
Conversation
Merge pull request CosmoStat#20 from AndreasTersenov/mass_map_generator
Merge the updates from "code_organisation".
Merge Martin's and Lucie's commits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's try to clean up the SLICS module a bit
sp_peaks/mapping.py
Outdated
from lenspack.starlet_l1norm import noise_coeff, get_l1norm_noisy | ||
from astropy.stats import mad_std | ||
from scipy import ndimage as ndi | ||
|
||
def create_kappa_map(ra, dec, g1_sim, g2_sim, size_x_deg=10, size_y_deg=10, pixel_size_emap_amin=0.4): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
break this up into a binning function and a mass mapping function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll do that. Then we will have only the binning function in the module, since the mass mapping itself is done by ks93
from lenspack
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could have a wrapper function that then calls the binning function and the mass mapping function
|
||
return data | ||
|
||
def read_SLICS_cosmo_params(file_path): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd modify this function to look more like "read_catalog"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file that is to be read by this function is a .dat file (CosmoTable.dat) and I think it cannot be read with ascii.read()
, so I could only do it like this. There should however be a better way to do this, I just don't know it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i just tried ascii.read() for the .dat file and it works. make sure you include from astropy.io import ascii
Added bookkeping functions to the
slics.py
module, updated the notebook so that it uses the functions from the modules & tested it. Addresses part of issue #6 .