halo-analysis 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,24 @@
1
+ Copiright 2014-2024 by Andrew Wetzel <arwetzel@gmail.com>, Shea Garrison-Kimmel, Zach Hafen, Nico Garavito-Camargo
2
+
3
+ If you use this package, please cite it, along the lines of: 'This work used HaloAnalysis (http://ascl.net/2002.014), which first was used in Wetzel et al 2016 (https://ui.adsabs.harvard.edu/abs/2016ApJ...827L..23W).'
4
+
5
+ You are free to use, edit, share, and do whatever you want. But please cite it and report bugs!
6
+
7
+ Less succinctly, this software is governed by the MIT License:
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
10
+ this software and associated documentation files (the 'Software'), to deal in
11
+ the Software without restriction, including without limitation the rights to
12
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13
+ the Software, and to permit persons to whom the Software is furnished to do so,
14
+ subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE aAUTHORS OR
22
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\href{https://github.com/jngaravitoc/nba}{NBA}, Cranes.
@@ -0,0 +1,152 @@
1
+ Metadata-Version: 2.1
2
+ Name: halo_analysis
3
+ Version: 1.0.0
4
+ Summary: read and analyze halo/galaxy catalogs
5
+ Author: Shea Garrison-Kimmel, Zach Hafen, Nico Garavito-Camargo
6
+ Author-email: Andrew Wetzel <arwezel@gmail.com>
7
+ Maintainer-email: Andrew Wetzel <arwetzel@gmail.com>
8
+ License: Copiright 2014-2024 by Andrew Wetzel <arwetzel@gmail.com>, Shea Garrison-Kimmel, Zach Hafen, Nico Garavito-Camargo
9
+
10
+ If you use this package, please cite it, along the lines of: 'This work used HaloAnalysis (http://ascl.net/2002.014), which first was used in Wetzel et al 2016 (https://ui.adsabs.harvard.edu/abs/2016ApJ...827L..23W).'
11
+
12
+ You are free to use, edit, share, and do whatever you want. But please cite it and report bugs!
13
+
14
+ Less succinctly, this software is governed by the MIT License:
15
+
16
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
17
+ this software and associated documentation files (the 'Software'), to deal in
18
+ the Software without restriction, including without limitation the rights to
19
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
20
+ the Software, and to permit persons to whom the Software is furnished to do so,
21
+ subject to the following conditions:
22
+
23
+ The above copyright notice and this permission notice shall be included in all
24
+ copies or substantial portions of the Software.
25
+
26
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
28
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE aAUTHORS OR
29
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
30
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
31
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\href{https://github.com/jngaravitoc/nba}{NBA}, Cranes.
32
+
33
+ Project-URL: Repository, https://bitbucket.org/awetzel/halo_analysis/src/master/
34
+ Project-URL: Issues, https://bitbucket.org/awetzel/halo_analysis/issues?status=new&status=open&status=submitted
35
+ Keywords: gizmo,astronomy,astrophysics,cosmology,galaxies,stars,dark matter
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: License :: OSI Approved :: MIT License
38
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
39
+ Classifier: Development Status :: 4 - Beta
40
+ Classifier: Operating System :: OS Independent
41
+ Requires-Python: >=3.8
42
+ Description-Content-Type: text/markdown
43
+ License-File: LICENSE.md
44
+ Requires-Dist: numpy>=1.22.2
45
+ Requires-Dist: scipy>=1.13.1
46
+ Requires-Dist: h5py>=3.9.0
47
+ Requires-Dist: matplotlib>=3.8
48
+ Requires-Dist: utilities-awetzel>=1.0
49
+
50
+ # Description
51
+
52
+ Python package to read and analyze halo/galaxy catalogs (generated from Rockstar or AHF) and merger trees (generated from ConsistentTrees).
53
+
54
+
55
+ ---
56
+ # Requirements
57
+
58
+ python 3, numpy, scipy, h5py, matplotlib
59
+
60
+ This package also requires the [utilities/](https://bitbucket.org/awetzel/utilities) python package for low-level utility functions.
61
+
62
+
63
+ ---
64
+ # Contents
65
+
66
+ ## halo_analysis
67
+
68
+ ### halo_io.py
69
+ * read halo files, convert from text to hdf5 format, assign particle species to dark-matter halos
70
+
71
+ ### halo_plot.py
72
+ * analyze and plot halos/galaxies
73
+
74
+ ### halo_select.py
75
+ * select halos from large simulations for generating initial conditions for zoom-in
76
+
77
+ ## tutorials
78
+
79
+ ### halo_tutorial.ipynb
80
+ * Jupyter notebook tutorial for using this package
81
+
82
+ ## data
83
+
84
+ ### snapshot_times.txt
85
+ * example file for storing information about snapshots: scale-factors, redshifts, times, etc
86
+
87
+
88
+ ---
89
+ # Units
90
+
91
+ Unless otherwise noted, this package stores all quantities in (combinations of) these base units
92
+ * mass [M_sun]
93
+ * position [kpc comoving]
94
+ * distance, radius [kpc physical]
95
+ * time [Gyr]
96
+ * temperature [K]
97
+ * magnetic field [Gauss]
98
+ * elemental abundance [linear mass fraction]
99
+
100
+ These are the common exceptions to those standards
101
+ * velocity [km/s]
102
+ * acceleration [km/s / Gyr]
103
+ * gravitational potential [km^2 / s^2]
104
+ * rates (star formation, cooling, accretion) [M_sun / yr]
105
+ * metallicity (if converted from stored massfraction) [log10(mass_fraction / mass_fraction_solar)], using Asplund et al 2009 for Solar
106
+
107
+
108
+ ---
109
+ # Installing
110
+
111
+ The easiest way to install the analysis code and all dependencies is by using `pip` or conda.
112
+
113
+ ```
114
+ python -m pip install halo_analysis
115
+
116
+ ```
117
+
118
+ To install from source, clone the latest version of `gizmo_analysis` from `bitbucket` using `git`:
119
+
120
+ ```
121
+ git clone git://bitbucket.org/awetzel/halo_analysis.git
122
+ ```
123
+
124
+ To build and install the project, inside the cloned `halo_analysis` directory:
125
+
126
+ ```
127
+ python -m pip install .
128
+ ```
129
+
130
+
131
+ ---
132
+ # Using
133
+
134
+ Once installed, you can use individual modules like this:
135
+
136
+ ```
137
+ import halo_analysis
138
+ halo_analysis.halo_io
139
+ ```
140
+
141
+ or more succinctly like this
142
+
143
+ ```
144
+ import halo_analysis as halo
145
+ halo.io
146
+ ```
147
+
148
+
149
+ ---
150
+ # Citing
151
+
152
+ If you use this package, please cite it, along the lines of: 'This work used HaloAnalysis (http://ascl.net/2002.014), which first was used in Wetzel et al 2016 (https://ui.adsabs.harvard.edu/abs/2016ApJ...827L..23W).'
@@ -0,0 +1,103 @@
1
+ # Description
2
+
3
+ Python package to read and analyze halo/galaxy catalogs (generated from Rockstar or AHF) and merger trees (generated from ConsistentTrees).
4
+
5
+
6
+ ---
7
+ # Requirements
8
+
9
+ python 3, numpy, scipy, h5py, matplotlib
10
+
11
+ This package also requires the [utilities/](https://bitbucket.org/awetzel/utilities) python package for low-level utility functions.
12
+
13
+
14
+ ---
15
+ # Contents
16
+
17
+ ## halo_analysis
18
+
19
+ ### halo_io.py
20
+ * read halo files, convert from text to hdf5 format, assign particle species to dark-matter halos
21
+
22
+ ### halo_plot.py
23
+ * analyze and plot halos/galaxies
24
+
25
+ ### halo_select.py
26
+ * select halos from large simulations for generating initial conditions for zoom-in
27
+
28
+ ## tutorials
29
+
30
+ ### halo_tutorial.ipynb
31
+ * Jupyter notebook tutorial for using this package
32
+
33
+ ## data
34
+
35
+ ### snapshot_times.txt
36
+ * example file for storing information about snapshots: scale-factors, redshifts, times, etc
37
+
38
+
39
+ ---
40
+ # Units
41
+
42
+ Unless otherwise noted, this package stores all quantities in (combinations of) these base units
43
+ * mass [M_sun]
44
+ * position [kpc comoving]
45
+ * distance, radius [kpc physical]
46
+ * time [Gyr]
47
+ * temperature [K]
48
+ * magnetic field [Gauss]
49
+ * elemental abundance [linear mass fraction]
50
+
51
+ These are the common exceptions to those standards
52
+ * velocity [km/s]
53
+ * acceleration [km/s / Gyr]
54
+ * gravitational potential [km^2 / s^2]
55
+ * rates (star formation, cooling, accretion) [M_sun / yr]
56
+ * metallicity (if converted from stored massfraction) [log10(mass_fraction / mass_fraction_solar)], using Asplund et al 2009 for Solar
57
+
58
+
59
+ ---
60
+ # Installing
61
+
62
+ The easiest way to install the analysis code and all dependencies is by using `pip` or conda.
63
+
64
+ ```
65
+ python -m pip install halo_analysis
66
+
67
+ ```
68
+
69
+ To install from source, clone the latest version of `gizmo_analysis` from `bitbucket` using `git`:
70
+
71
+ ```
72
+ git clone git://bitbucket.org/awetzel/halo_analysis.git
73
+ ```
74
+
75
+ To build and install the project, inside the cloned `halo_analysis` directory:
76
+
77
+ ```
78
+ python -m pip install .
79
+ ```
80
+
81
+
82
+ ---
83
+ # Using
84
+
85
+ Once installed, you can use individual modules like this:
86
+
87
+ ```
88
+ import halo_analysis
89
+ halo_analysis.halo_io
90
+ ```
91
+
92
+ or more succinctly like this
93
+
94
+ ```
95
+ import halo_analysis as halo
96
+ halo.io
97
+ ```
98
+
99
+
100
+ ---
101
+ # Citing
102
+
103
+ If you use this package, please cite it, along the lines of: 'This work used HaloAnalysis (http://ascl.net/2002.014), which first was used in Wetzel et al 2016 (https://ui.adsabs.harvard.edu/abs/2016ApJ...827L..23W).'
@@ -0,0 +1,4 @@
1
+ from . import halo_default as default
2
+ from . import halo_io as io
3
+ from . import halo_plot as plot
4
+ from . import halo_select as select
@@ -0,0 +1,27 @@
1
+ '''
2
+ Default names and values for files and directories used throughout this package.
3
+ If you prefer a different default, change it here, and it should propagate througout the package.
4
+ Some names have wildcards, such as '*', or '!', these represent name bases, generally for finding
5
+ any/all such files in a directory via glob.
6
+
7
+ @author: Andrew Wetzel <arwetzel@gmail.com>
8
+ '''
9
+
10
+ # base directory of a simulation
11
+ # setting to '.' assumes that you are running analysis from within a simulation directory
12
+ simulation_directory = '.'
13
+
14
+ # directory of all halo files, typically the first directory within simulation_directory
15
+ halo_directory = 'halo/'
16
+
17
+ # directory of all rockstar files (needs to include root halo_directory if within it)
18
+ rockstar_directory = halo_directory + 'rockstar_dm/'
19
+
20
+ # directory of rockstar raw text files, within rockstar_directory
21
+ rockstar_catalog_directory = 'catalog/'
22
+
23
+ # directory of rockstar processed hdf5 files, within rockstar_directory
24
+ rockstar_catalog_hdf5_directory = 'catalog_hdf5/'
25
+
26
+ # directory of rockstar processed hdf5 files
27
+ rockstar_job_directory = 'rockstar_jobs/'