Skip to content

Commit ed2c8ff

Browse files
robjmcgibbonVictorForouharivastar
authored
JOSS paper submission (#124)
* Record processing time for each halo * Skip density check for satellites * Use written chunks when restarting * Store calculation time for each property * Use lookup table for stellar ages * Add links to footnotes * Remove unneeded sort * Squash sort bug * Non iterative inertia tensors * Catch io errors for chunk files * Move filter to parameter file * Remove VR FOFSubhalo halo type * Remove GroupNr_all * Descriptions for timing information * Sort halos on chunk * Report peak memory usage * Copy values from smaller apertures * Store filter metadata for properties * Fix docs generation * Add script for plotting timings * Added wrong plot_time script * Update plot time script * Plot setup time * Various minor fixes * Wrap COM values * Add Victor symmetric array script * Set min read radius to be optional * Matthieu documentation suggestions * Change assigning of files to ranks * Add MPI compression script * Set compressed properties to be read-only * Add vmax radius to SO properties * Fix velocity scale factors * First attempt at reading in EAGLE * Calculate cell offsets * Working metadata * Working EAGLE conversion script * Add L100 EAGLE * Add license * Add JOSS paper * Fix tests * Create SOAP package * Run formatter * Remove stray file * Update formatter version * Format all files * Minor paper compilation updates * Address pre-review comments (#133) * Use pyproject.toml instead of setup.py * Update packages * List packages * Find packages automatically * Add small DMO example * Test subhalo rank with HBT data * Add scripts for running HBT/VR * Make test helper script MPI-compatible * Generate documentation for small test * Move Rockstar test and read with numpy instead of pandas * Add rockstar test * Run formatter * Move subfind test * Update scripts * Include neutrinos in omega_m * Update dust fraction calculation (#134) * Don't use hydrogen fraction for dust properties * Typo footnote_dust.tex * Update parameter file README (#136) * Update parameter file README * Mention pdf doco * Check each halo type for valid properties (#137) * Have central's HostHaloIndex point to themselves (#138) * Allow for different alias for snipshots (#139) * Adding a number of extra properties (#141) * Add dust properties * Add stellar CoM * Update test * Minor name update * Remove references to centre of potential (#143) * Calculate SOAP index of progenitor/descendant (#142) * Small refactor * Don't update skipped SOAP properties * Format * Calculate and store progenitor/descendant indices * Update handling of named columns * Format * Add footnote * Calculate fof radii (#144) * Script v1 * Create files across ranks * Update docs * Create virtual file * Use relative paths * Format * Add test * Use absolute positions * Proper no wrap * FOF radii * Update SOAP to read new values * Add half-light radii for each GAMA band. (#145) * Defined new half light radii property * Copied get_half_mass_radius to start implementing luminosity weighting. * Create general function to find radius enclosing half of a given quantity * Defined half light radius. * Fix a couple of bugs. * Script to obtain the SOAP property evolution for specified HBT-HERONS subhaloes (#146) * Add script * Fix redshift saving in HDF5 * Update misc README.md * Make the script load the TrackIds and properties from a text file. * Fixing typos * Skip assert check for ranks with no subhalos (#148) * Luminosity-weighted angular momenta and inertia tensors (#135) * Add shorthand to obtain grik luminosities. * Add basic functions to measure disc to total luminosity in different bands. * Make new properties not be computed by default * Add call of unimplemented function that computes light weighted L quantities. * Define function for luminosity weighted L quantities. Not implemented for now. * Add docs on parameters for get_angular_momentum_and_kappa_corot_luminosity_weighted * Make kappa_corot and counterotating mass give a value per GAMMA band * Add counterrotating luminosity array * Handle multiple luminosity bands when computing average angular momentum * Compute projected angular momentum if we do_counterrot_luminosity * We now compute if stars are counterrotating or not for each luminosity band. Expanded description of unyt array shapes to keep track in each step. * fix typo * Basic implementation done. * Add correct return and remove NotImplemented error * Change variables assigned to subhaloes to prevent overwritting mass-weighted calculations * Only return a single property, which includes all GAMMA bands. * Return a mass and light-based D/T. * Add kappa_corot for luminosity bands * change variable name * Add property to save all luminosity-weighted angular momentum * Add property definition in the Aperture properties * Added new properties to the property table * Add properties to the subhalo properties parameter file of COLIBRE * Remove lazy properties that were not needed anymore * Update docstring * Add luminosity-weighted angular momenta to bound subhalo properties * Add properties to the ApertureProperties parameter file section * Change output expected type * Change condition to execute new properties. Mainly because of an annoying inconsistent between how starless subhaloes are handled. Mstar = 0 but Luminosities = None. * Fix some indicies and if condition * Add important clarification * Fix bug in kappa_corot definition. * Formatting alignment * Add luminosity-weighted quantities to SO apertures * Clarification comment * Individual angular momentum for particles is now correct for kinetic energy calculation * Fix GAMA typo * Remove mass term form average angular momentum we keep it in the individual particle angular momentum to obtain the kinetic energy in rotation. * Create copy of inertia tensor to implement luminosity weighting * Update description and inputs of inertia tensor * Mask luminosities if we mask other properties * Add comment... * Create correct shape for eigenval and eigenvec matricies * Shapes for each luminosity band * Add stopping criteria on a per band basis * Define the luminosity-weighted inertia tensor for BoundSubhalos * Compute particle positions for each band. Perhaps unneccessary since they will have the same positions in every band... Check how to improve later on. * Update break condition to be done on a luminosity band basis * Assign luminosity-based weights * is_converged is now a boolean array * Remove comment that was already addressed * Tensor for each band done. Still need to check if it gives me the correct element ordering relative to the default calculation of the inertia tensor. * Re-add removed calculation of inertia tensor eigenvalue/vectors * Create variable to hold the number of provided luminosity bands * Return flattened matricies for each band * Remove bug in stopping criteria for iterative tensor * Added missing np.abs() call It was causing the new function to stop iterating early * Add import of new function * Fix to prevent overflows into negative values for eigenvectors of inertia tensor * Defined luminosity weighted projected inertia tensor * Add call to luminosity-weighted function (undefined yet) * Define luminosity weighted function and pass luminosity arrays. * Correct typo from main branch * Finish implementation of get_projected_inertia_tensor_luminosity_weighted. Directly taken from 3D inertia calculations. Will likely need some restructuring. * Fix incorrect comment statement * Bug: using 3D positions instead of projected... * Change location of axis ratio transpose * Handle q = 0 values when testing convergence. * Handle 0 / 0 division. * Make q be an array from the get go * Only compute tensors for non converged bands * Do not rely on disabling warnings to handle q = 0 cases. * Make q = 0 tensors to have all matrix entries to be equal to 0. * Formatting * Update variable names and parameter files * Make get_inertia_tensor_luminosity_weighted only do computations for non-converged bands More similar to get_projected_inertia_tensor_luminosity_weighted * Fix issue resulting from merging * Make 3D inertia tensors general * Fix typo en error message * Make mass-weighted inertia tensor more self-evident * Make projected inertia tensors general * Two bugs: incorrect function call and units in reduced tensors * Move inertia tensor functions into their own file * Fix unyt array initialisation to specify unit registry * Generalise kappa_corot * Shorten the description of helper functions * Update colibre test * Reformat * Add note on single particle * Remove questions --------- Co-authored-by: robjmcgibbon <[email protected]> * Full SOAP EAGLE catalogues (#150) * Add more EAGLE snapshot properties * Add script to approximate H fractions * Use proper index for SOAP EAGLE * Update scripts * Squash bugs * Define apertures based on BoundSubhalo properties (#147) * Add note on timing flags * Allow for property defined apertures * Add error messages if required radii are disabled * Missing method * Update pdf documentation * Add massive halos for testing * Format * Add contribution guide (#151) * JOSS - Stuart comments 1 (#154) * Merge fof position test * Update docs * Add project scripts & fix tests * Format * Add venv script for strw * Rerun pdf generation * Update README.md * Match subhalos using membership files (#156) * Backbone broken * Fix test in calculate_fof_pos * Run matching * Match to SOAP idx * Check matches are consistent * Output to file * Squash bug when saving * Update docs * Centrals only * Update README * Add __main__ * Run formatter * Require astropy >= 6 * Update README * Generate pdf with all properties * Set lower limit on dust mass fractions (#158) * Set lower limit * Format * Add DM CoM (#159) * Add sbatch script for calculating FoF radii (#162) * Add sbatch script for FOF radii * Skip assert for ranks with no halos * Nicer check * Read new names if present (#163) * Add workflow to check code is formatted (#165) * Add format workflow * Add --check * Run formatter * COLIBRE core excision (#167) * Exclude COLIBRE core * HalfMassRadii H * Binding energies and Vmax calculations (#132) * Read binding energy from HBT * Output TotalBindingEnergy * Vmax for aperture properties * Squash bug and format * Stop ranks hanging when reading binding energy * Read SnapshotIndexOfLastIsolation * Read in potential energy instead of binding * Remove duplicate line * Use vCoM from all particles * Move subhalo_properties check for Ntot * Update COLIBRE test * Remove Ntot warning * Add documentation of SpecificPotentialEnergies * Add parameter file option to read energy * Review changes * Editorial changes (#171) * Editorial changes. * Update paper.bib * A couple of more changes * Update title capitalization * Set read_potential_energy default to false * Add more references * Read sorted HBT (#172) * Add script to recalculate COLIBRE FOF (#166) * Add sbatch script for FOF radii * Skip assert for ranks with no halos * Nicer check * More logging * Add option to copy datasets * Add node requirements --------- Co-authored-by: Victor J. Forouhar Moreno <[email protected]> Co-authored-by: Ivelina Momcheva <[email protected]>
1 parent ef559e3 commit ed2c8ff

File tree

178 files changed

+18331
-11194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+18331
-11194
lines changed

.github/workflows/main.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: CI
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the master branch
8+
push:
9+
branches: [ master ]
10+
pull_request:
11+
branches: [ master ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+
jobs:
18+
# Formatting check
19+
formatting:
20+
# The type of runner that the job will run on
21+
runs-on: ubuntu-latest
22+
23+
# Steps represent a sequence of tasks that will be executed as part of the job
24+
steps:
25+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26+
- uses: actions/checkout@v2
27+
28+
# Runs the formatting script
29+
- name: Formatting
30+
run: bash format.sh --check

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ __pycache__
22
*~
33
logs
44
openmpi-5.0.3-hdf5-1.12.3-env
5+
black_formatting_env
6+
*egg-info
57

68
documentation/SOAP.aux
79
documentation/SOAP.log
@@ -16,3 +18,5 @@ documentation/units.tex
1618

1719
tests/FLAMINGO/test_parameters.yml
1820
tests/COLIBRE/test_parameters.yml
21+
tests/test_SO_radius_*.png
22+
test_data/*

CONTRIBUTING.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
Contributing to SOAP
2+
==========================
3+
4+
Contributions for SOAP should come through our GitHub repository,
5+
available at https://github.com/swiftsim/SOAP.
6+
7+
Contributions are always welcome, but you should make sure of the following:
8+
9+
+ Your contributions pass all unit tests
10+
+ Your contributions add unit tests for new functionality
11+
+ Your contributions are formatted with the `black` formatter (see `format.sh`)
12+
+ Your contributions are documented fully
13+
14+
You should also abide by the following code of conduct:
15+
16+
### Code of Conduct
17+
18+
The community of participants in open source Astronomy projects is made up of
19+
members from around the globe with a diverse set of skills, personalities,
20+
and experiences. It is through these differences that our community
21+
experiences success and continued growth. We expect everyone in our community
22+
to follow these guidelines when interacting with others both inside and
23+
outside of our community. Our goal is to keep ours a positive, inclusive,
24+
successful, and growing community.
25+
26+
As members of the community,
27+
28+
+ We pledge to treat all people with respect and provide a harassment- and
29+
bullying-free environment, regardless of sex, sexual orientation and/or
30+
gender identity, disability, physical appearance, body size, race,
31+
nationality, ethnicity, and religion. In particular, sexual language and
32+
imagery, sexist, racist, or otherwise exclusionary jokes are not appropriate.
33+
+ We pledge to respect the work of others by recognizing
34+
acknowledgement/citation requests of original authors. As authors, we pledge
35+
to be explicit about how we want our own work to be cited or acknowledged.
36+
+ We pledge to welcome those interested in joining the community, and realize
37+
that including people with a variety of opinions and backgrounds will only
38+
serve to enrich our community. In particular, discussions relating to
39+
pros/cons of various technologies, programming languages, and so on are
40+
welcome, but these should be done with respect, taking proactive measure to
41+
ensure that all participants are heard and feel confident that they can
42+
freely express their opinions.
43+
+ We pledge to welcome questions and answer them respectfully, paying
44+
particular attention to those new to the community. We pledge to provide
45+
respectful criticisms and feedback in forums, especially in discussion
46+
threads resulting from code contributions.
47+
+ We pledge to be conscientious of the perceptions of the wider community and
48+
to respond to criticism respectfully. We will strive to model behaviours that
49+
encourage productive debate and disagreement, both within our community and
50+
where we are criticized. We will treat those outside our community with the
51+
same respect as people within our community.
52+
+ We pledge to help the entire community follow the code of conduct, and to
53+
not remain silent when we see violations of the code of conduct. We will
54+
take action when members of our community violate this code such as
55+
contacting [email protected] with the subject line SOAP Code
56+
of Conduct (all emails sent in this fashion will be treated with the
57+
strictest confidence) or talking privately with the person.
58+
+ This code of conduct applies to all community situations online and
59+
offline, including mailing lists, forums, social media, conferences,
60+
meetings, associated social events, and one-to-one interactions.
61+
62+
Any related activity or project organized by members of the SOAP
63+
community, including affiliated packages, are welcome to have their own codes
64+
of conduct, but agree to also abide by the present code of conduct.
65+
66+
Parts of this code of conduct have been adapted from the PSF code of conduct and
67+
the Astropy code of conduct: https://www.astropy.org/code_of_conduct.html.

0 commit comments

Comments
 (0)