-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I worked on the hos branch, but there are still some problems to fix and code to optimize.
Module pycs.astro.wl.mass_mapping
- Remove
forloops wherever possible - Vectorize mass mapping methods: operate on stacks of images rather than single images.
- Class
massmap2d: it would be better to create a separate class for each mass mapping method, inheriting from a base class implementing aforwardorpredictmethod. This way, it would be easier to write code which is shared among all mass mapping methods. E.g.,BaseMassmap2d,ProxWiener,ProxMSE,SparseWiener. - Improve intermediate methods such as
massmap2d._prepare_data,massmap2d._get_Wfcandmassmap2d._noise_realizations: instead of returning many variables, register them as instance attributes or properties for the classesmassmap2dorshear_data? - Class and variable names: should respect the Python standards.
- Classes
shear_data,massmap2dandstarlet2d: put attribute declaration within the__init__methods. Moreover, mergeinit_massmapandinit_starletinto the respective__init__methods. - Are the attributes
nxandnyreally necessary formassmap2d? What aboutstarlet2d? - Remove argument
indfrom_prepare_data(removenp.wherewherever possible; useless most of the time) - Improve
mask = (Ncv < 1e2).astype(int)(could be placed before) - Bug correction in
gamma_to_cf_kappa(raiseNotImplementedError, to be done later if necessary) - Optimize
kappa_to_gamma,gamma_to_cf_kappa,gamma_to_kappa,H_operator_eb2gandH_adjoint_g2eb: work on complex arrays - Remove redundancy with the above methods
Module pycs.sparsity.sparse2d.starlet
- Class
MRStarlet: modify methodstransformandreconsin order them to operate on stacks of images (n-D tensors). Modify the C implementation, or implement them in PyTorch to take advantage of GPU acceleration. As a workaround, I usednp.vectorizeto achieve the same results, but computational efficiency could be widely improved.
Package pycs
- Work with
dtype = np.float32andnp.complex64, ordtype = np.float64andnp.complex128? Harmonize code. - Remove
np.copy()wherever possible (useless memory usage)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request