Simulation
simulation
¶
Simulation
¶
Bases: Module
Source code in src/simulation.py
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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
__call__()
¶
Creates a realization of a GRF for the speed along the los Projects the speed with em-weighting in binned maps Adds measurement error Returns the structure function
Returns:
Name | Type | Description |
---|---|---|
dist |
array
|
Vector of separations at which the SF is computed |
sf |
array
|
SF of centroid shift |
sf_std |
array
|
SF of broadening |
v_vec |
array
|
Vector of centroid shifts |
std_vec |
array
|
Vector of broadenings |
Source code in src/simulation.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
__init__(spatial_grid, structure_function, binning, projection, radial_bins_mes_errors, censhift_offsets, censhift_errors, broad_offsets, broad_errors)
¶
Initialize simulation model
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spatial_grid
|
Module
|
3D spatial grid |
required |
structure_function
|
Module
|
Structure Function |
required |
binning
|
Module
|
Binning |
required |
projection
|
hk.Module)
|
Projection |
required |
radial_bins_mes_errors
|
array
|
Bounds of the radial bins defininf the measurement error |
required |
censhift_offsets
|
array
|
Means of censhift measurement error |
required |
censhift_errors
|
array
|
stds of censhift measurement error |
required |
broad_offsets
|
array
|
Means of broadening measurement error |
required |
broad_errors
|
array
|
std of censhift measurement error |
required |
Source code in src/simulation.py
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 |
|