Open
Conversation
Owner
Author
|
Might take this opportunity to remove Hankel transform dependency |
Owner
Author
|
New features added:
|
This was
linked to
issues
Mar 12, 2026
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 8 changed files in this pull request and generated 12 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+311
to
+329
| def init_from_catalog( | ||
| cls, | ||
| data_position_sky, | ||
| rcom_max, | ||
| grid_size, | ||
| grid_type, | ||
| kind, | ||
| **kwargs, | ||
| ): | ||
| grid = mesh.grid_data_density( | ||
| data_position_sky, | ||
| rcom_max, | ||
| grid_size, | ||
| grid_type, | ||
| kind, | ||
| **kwargs, | ||
| ) | ||
|
|
||
| return cls(grid) |
Comment on lines
+262
to
+266
| pm = ParticleMesh( | ||
| BoxSize=boxsize, | ||
| Nmesh=nmesh, | ||
| dtype="f8", | ||
| ) |
Comment on lines
+120
to
+132
| if ( | ||
| "alpha_low" in parameter_values_dict | ||
| and "alpha_high" in parameter_values_dict | ||
| and "x1_treshold" in parameter_values_dict | ||
| ): | ||
| alpha = jnp.where( | ||
| self._data["x1"] < parameter_values_dict["x1_treshold"], | ||
| parameter_values_dict["alpha_low"], | ||
| parameter_values_dict["alpha_high"], | ||
| ) | ||
| else: | ||
| alpha = parameter_values_dict["alpha"] | ||
|
|
Comment on lines
+245
to
+276
| def create_mesh( | ||
| positions, | ||
| boxsize, | ||
| cellsize, | ||
| assignement="ngp", | ||
| weights=None, | ||
| scaling=None, | ||
| ): | ||
|
|
||
| conversions = {"ngp": "nnb", "cic": "cic", "tsc": "tsc", "pcs": "pcs"} | ||
| resampler = conversions[assignement] | ||
|
|
||
| nmesh, boxsize, boxcenter = _get_mesh_attrs( | ||
| boxsize, | ||
| cellsize, | ||
| ) | ||
|
|
||
| pm = ParticleMesh( | ||
| BoxSize=boxsize, | ||
| Nmesh=nmesh, | ||
| dtype="f8", | ||
| ) | ||
| offset = boxcenter - boxsize / 2.0 | ||
| _slab_npoints_max = int(1024 * 1024 * 4) | ||
|
|
||
| def paint(positions, weights, scaling, out, transform=None): | ||
| positions = positions - offset | ||
| factor = 0.5 | ||
| if not np.isfinite(positions).all(): | ||
| raise ValueError("Some positions are NaN/inf") | ||
| if not np.isfinite(weights).all(): | ||
| raise ValueError("Some weights are NaN/inf") |
flip/data_vector/mesh.py
Outdated
|
|
||
| data_position_sky_bandwidth = data_position_sky_bandwidth[mask, :, :] | ||
|
|
||
| data_position_bandwith = jacobian @ data_position_sky_bandwidth @ jacobian.T |
Comment on lines
+623
to
+631
| for i in range(data_positions.shape[0]): | ||
| kernel_weights = multivariate_kernel_density_estimation( | ||
| data_positions[i], | ||
| data_position_bandwith[i], | ||
| grid_positions, | ||
| kernel=kernel, | ||
| cutoff_type=cutoff_type, | ||
| threshold=threshold, | ||
| ) |
| import numpy as np | ||
|
|
||
| from flip.covariance import CovMatrix | ||
| from flip.data_vector import mesh |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
merging main
Owner
Author
|
cosmoprimo and pypower are no longer required. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mesh improvements.
The idea is to