Binning
binning
¶
LoadBinning
¶
Get the different arrays used for a simulation instance from a pickle binning as created by xifu cluster sims. The count map is needed for returning the count_weighted barycentre of each bin.
Source code in src/binning.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
__call__()
¶
Create the different quantities used from the binning
Returns:
Name | Type | Description |
---|---|---|
X_pixels |
array
|
Array of x coordinate of each pixel on the xifusim images |
Y_pixels |
array
|
Array of y coordinate of each pixel on the xifusim images |
bin_num_pix |
array
|
Array of the bin number of each pixel |
nb_bins |
int
|
Number of bins |
xBar_bins |
array
|
Arrays of the count-wieghted barycenters, x coordinate |
yBar_bins |
array
|
Arrays of the count-wieghted barycenters, y coordinate |
bin_nb_map |
array
|
Map of the bin numbers (mainly used as a sanity check) |
Source code in src/binning.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
__init__(shape=(360, 360), binning_file='/xifu/home/mola/Turbu_300kpc_mosaics/repeat10_125ks/19p_region_200/region_files/19p_region_dict.p', count_map_file='/xifu/home/mola/Turbu_300kpc_mosaics/repeat10_125ks/19p_count_image.fits')
¶
Initialize binning
Parameters:
Name | Type | Description | Default |
---|---|---|---|
shape
|
tuple
|
Shape of the final map to provide (should match the shape from SpatialGrid3D) |
(360, 360)
|
binning_file
|
str
|
Path to pickle file containing binning dict |
'/xifu/home/mola/Turbu_300kpc_mosaics/repeat10_125ks/19p_region_200/region_files/19p_region_dict.p'
|
count_map_file
|
str
|
Path to count map |
'/xifu/home/mola/Turbu_300kpc_mosaics/repeat10_125ks/19p_count_image.fits'
|
Source code in src/binning.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|