syasini / astropaint Goto Github PK
View Code? Open in Web Editor NEWA python package for creating mock maps of astrophysical signals from a halo catalog
License: MIT License
A python package for creating mock maps of astrophysical signals from a halo catalog
License: MIT License
The current masses have an extra factor of h, but the profiles (e.g. Battaglia16) take in M_200c/h.
Thanks to @marcelo-alvarez for finding the bug.
Add units to maps and integrate the unit_conversion module into Canvas.
Currently, the canvas.cut_mask()
method takes in the healpix map of an experiment footprint. It would be nice to allow the user to apply such cuts using experiment footprints. For example
canvas.cut_mask("CMB-S4", inplace=True)
canvas.cut_mask("DESI", inplace=True)
would limit the catalog to the common footprint between S4 and DESI.
TODO: Add masks from cmb x galaxy web app to the data directory.
Add the tSZ/y parameter profiles to Battaglia16.py.
Methods are already available in python (courtesy of Emmanuel Schaan) and just need to be added to the module in s structured manner.
Leave a comment for further clarification on this.
I'm just wondering if there is for specifying such an old version of scipy?
scipy==1.3.0
This scipy
release appears to be over a year old, and from some minor experimentation locally AstroPaint
works perfectly with later versions of scipy
(even the latest version).
There are actually a few hardcoded version numbers, which could maybe be relaxed, slightly.
Implement the Einasto profile module. The new module should live here astropaint/profiles/Einasto.py
. The structure can be identical to NFW. Essentially the only difference would be the rho_3D
function.
The other profiles (kSZ, deflection_angle, etc) should be factorized into a separate module and then called into NFW and Einasto. Will open another issue for this soon.
Before running build_dataframe() check to see if parameters already exist in the catalog.
At the moment all parameters are calculated upon instantiation which causes large catalogs to load slowly.
Use the new version of healpy (1.14.0) and the LIC visualization feature to make a map of qSZ.
Use the example from here:
Add transformation method for converting different mass definitions to each other, in particular, M_200m -> M_200c.
The current version only takes in M_200c, but for example, WebSky only provides M_200m. A transformation function is needed (in the lib.transform
module) to convert the mass.
comment for further clarification on details.
Add CI workflow with GitHub Actions.
The workflow should lint the code and run the tests on push
and pull request
events.
Add tutorials/documention to readthedocs.
Desperately need help with this!
decorate the methods with CPU and memory profile decorators to find the bottlenecks in the code.
Create a new object called Easel
for handling and manipulating input maps (output of canvas.pixels).
Methods should include: zoom, show_map, save_to_file, get_Cl, etc.
I tried to follow some of the examples from the docs (https://astropaint.readthedocs.io/en/master/)
catalog = Catalog("websky_lite_redshift")
leads to an error that websky_lite_redshift.csv
does not exist. I assume it has been replaced by WebSky_2x2.csv
or WebSky_lite.csv
.
Add websky_lite_redshift file to repo and add reference
Current test cases are very limited. More tests needed.
Comment to discuss cases.
add joblib
remove YAML
check ray version
Rewrite the parallelization part with joblib to be consistent with cache=True
in spray.
Add a method for manually downloading the datasets in case git lfs is not installed.
Use case example for the method:
astropaint.download_dataset("WebSky_lite")
should download the WebSky_lite.csv
file from here to the local data directory. The path_dir
variable under paint_bucket
can be used to find the local data
directory` like this:
data_dir = os.path.join(path_dir, 'data')
other available methods include
astropaint.download_dataset("All")
to download all the files under data
.
stack_halos() method in the canvas should take in an arbitrary function and apply it to the cut out before stacking.
In most cases, the discs are solely used in the spray function so it might not be necessary to save them as a list. Replacing them with a generator will save a lot of memory and speed up the process.
Change disc query functions in Canvas
so they return generators instead of lists.
Add a new argument to Painter.spray
for manually setting the number of CPUs in parallel painting. This can probably replace the parallel=True
argument.
An example use case would be:
Painter.spray(canvas, n_cpus=-1)
to use all the cpus available (same as parallel=True
now)
and e.g.
Painter.spray(canvas, n_cpus=k)
to only use k cpus.
Paint a 2x2 kSZ patch and compare with maps provided by Marcelo at power spectrum level.
Create a canvas for pixell. Ideally, there should be a metaclass for the Canvas from which the healpy and pixell classes inherit from. The methods should be identical between the two modes (if possible).
The direction of the dipole should be aligned with the direction of the transverse velocity (cold spot towards motion).
Add directory with example scripts
Move the profiles in NFW (kSZ, deflection_angle) etc to another module and call them into NFW and Einasto. This will avoid code repetition in various modules.
Comment below for further clarification.
create a shared stack with ray.put() and add cut_outs to it in parallel.
The distances from the halo center r
are automatically calculated (even if they are not needed) and r_hat
has to be explicitly calculated using canvas.find_discs_2center_vec()
. These should be automated based on the arguments passed to the profile function.
JOSS reviewer here, again! (openjournals/joss-reviews#2608)
I'm working your tutorial notebook, and I have run into a problem with Painter.spray()
's parallel=True
argument. It seems that parallel=True
is being passed to the function used as the template
argument of the Painter
instance. This is happening because Painter.spray()
has no argument by that name. Eliminating this argument from the call to Painter.spray()
yields the expected output.
I'm on version 0.1.1, which appears to be the most current. FWIW, this error also manifests with the public binder.
I suspect that the n_cpus
argument has replaced parallel
. If this is correct, please do update all public tutorials to reflect this.
Stack the signals and average to make sure we get the radial profile back.
Add redshift to websky_2x2.csv file
Hello, I am one of your JOSS reviewers! (openjournals/joss-reviews#2608)
I haven't been able to locate a plain-text LICENSE file in this repo. I see that an MIT license is listed in setup.py, so it would suffice to add the text from here into a new file called LICENSE in the top-level directory.
I find that in my local example problems (which are mostly derivatives of those given in the docs) that n_cpus=1
is faster than any other choice.
However, the code defaults to n_cpus=-1
for all problems. Do you expect / also find that serial tasks should be faster? Do you expect a particular problem size at which parallel jobs are faster?
If this result is typical, perhaps n_cpus=1
is a better default, or a value which can switch depending on the inferred problem size.
This is just little thought I had - and maybe, my experience is isolated and the whole issue is redundant.
JOSS reviewer here! (openjournals/joss-reviews#2608)
Please add a Statement of Need to the public-facing documentation of this repo. You could paraphrase the text already included in the JOSS manuscript submission; and then insert it into either your existing repo README, include it in the RTD homepage (see #54), or preferably both!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.