Analysis Tools
Utilities
toast.ops.Delete
Bases: Operator
Class to purge data from observations.
This operator takes lists of shared, detdata, intervals and meta keys to delete from observations.
Source code in toast/ops/delete.py
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 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
detdata = List([], help='List of Observation detdata keys to delete')
class-attribute
instance-attribute
intervals = List([], help='List of tuples of Observation intervals keys to delete')
class-attribute
instance-attribute
meta = List([], help='List of Observation dictionary keys to delete')
class-attribute
instance-attribute
shared = List([], help='List of Observation shared keys to delete')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/delete.py
37 38 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/delete.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | |
_finalize(data, **kwargs)
Source code in toast/ops/delete.py
60 61 | |
_provides()
Source code in toast/ops/delete.py
78 79 | |
_requires()
Source code in toast/ops/delete.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
toast.ops.Reset
Bases: Operator
Class to reset data from observations.
This operator takes lists of shared, detdata, intervals, and meta keys to reset.
Numerical data objects and arrays are set to zero. String objects are set to an
empty string. Any object that defines a clear() method will have that called.
Any object not matching those criteria will be set to None. Since an IntervalList
is not mutable, any specified intervals will simply be deleted.
Source code in toast/ops/reset.py
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 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 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
detdata = List([], help='List of Observation detdata keys to reset')
class-attribute
instance-attribute
intervals = List([], help='List of tuples of Observation intervals keys to reset')
class-attribute
instance-attribute
meta = List([], help='List of Observation dictionary keys to reset')
class-attribute
instance-attribute
shared = List([], help='List of Observation shared keys to reset')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/reset.py
43 44 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/reset.py
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 | |
_finalize(data, **kwargs)
Source code in toast/ops/reset.py
93 94 | |
_provides()
Source code in toast/ops/reset.py
108 109 | |
_requires()
Source code in toast/ops/reset.py
96 97 98 99 100 101 102 103 104 105 106 | |
toast.ops.Copy
Bases: Operator
Class to copy data.
This operator takes lists of shared, detdata, and meta keys to copy to a new location in each observation.
Each list contains tuples specifying the input and output key names.
Source code in toast/ops/copy.py
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 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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
detdata = List([], help='List of tuples of Observation detdata keys to copy')
class-attribute
instance-attribute
intervals = List([], help='List of tuples of Observation intervals keys to copy')
class-attribute
instance-attribute
meta = List([], help='List of tuples of Observation meta keys to copy')
class-attribute
instance-attribute
shared = List([], help='List of tuples of Observation shared keys to copy')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/copy.py
76 77 | |
_check_detdata(proposal)
Source code in toast/ops/copy.py
52 53 54 55 56 57 58 59 60 61 62 | |
_check_meta(proposal)
Source code in toast/ops/copy.py
40 41 42 43 44 45 46 47 48 49 50 | |
_check_shared(proposal)
Source code in toast/ops/copy.py
64 65 66 67 68 69 70 71 72 73 74 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/copy.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
_finalize(data, **kwargs)
Source code in toast/ops/copy.py
151 152 | |
_provides()
Source code in toast/ops/copy.py
166 167 168 169 170 171 172 173 174 175 176 | |
_requires()
Source code in toast/ops/copy.py
154 155 156 157 158 159 160 161 162 163 164 | |
toast.ops.Combine
Bases: Operator
Arithmetic with detector data.
Two detdata objects are combined element-wise using addition, subtraction, multiplication, or division. The desired operation is specified by the "op" trait as a string. The result is stored in the specified detdata object:
result = first (op) second
If the result name is the same as the first or second input, then this input will be overwritten.
Source code in toast/ops/arithmetic.py
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 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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
first = Unicode(None, allow_none=True, help='The first detdata object')
class-attribute
instance-attribute
op = Unicode(None, allow_none=True, help="Operation on the timestreams: 'subtract', 'add', 'multiply', or 'divide'")
class-attribute
instance-attribute
result = Unicode(None, allow_none=True, help='The resulting detdata object')
class-attribute
instance-attribute
second = Unicode(None, allow_none=True, help='The second detdata object')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/arithmetic.py
53 54 | |
_check_op(proposal)
Source code in toast/ops/arithmetic.py
45 46 47 48 49 50 51 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/arithmetic.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 | |
_finalize(data, **kwargs)
Source code in toast/ops/arithmetic.py
142 143 | |
_provides()
Source code in toast/ops/arithmetic.py
152 153 154 155 156 | |
_requires()
Source code in toast/ops/arithmetic.py
145 146 147 148 149 150 | |
toast.ops.CalibrateDetectors
Bases: Operator
Multiply detector data by factors in the observation dictionary.
Given a dictionary in each observation, apply the per-detector scaling factors to the timestreams. Detectors that do not exist in the dictionary are flagged.
Source code in toast/ops/calibrate.py
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 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 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
cal_mask = Int(defaults.det_mask_invalid, help='Bit mask to apply to detectors with no calibration information')
class-attribute
instance-attribute
cal_name = Unicode('calibration', help='The observation or focalplane key containing the gains')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key for data to calibrate')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/calibrate.py
61 62 | |
_check_cal_mask(proposal)
Source code in toast/ops/calibrate.py
54 55 56 57 58 59 | |
_check_det_mask(proposal)
Source code in toast/ops/calibrate.py
47 48 49 50 51 52 | |
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/calibrate.py
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 | |
_finalize(data, **kwargs)
Source code in toast/ops/calibrate.py
102 103 | |
_provides()
Source code in toast/ops/calibrate.py
111 112 | |
_requires()
Source code in toast/ops/calibrate.py
105 106 107 108 109 | |
toast.ops.MemoryCounter
Bases: Operator
Compute total memory used by Observations in a Data object.
Every process group iterates over their observations and sums the total memory used by detector and shared data. Metadata and interval lists are assumed to be negligible and are not counted.
Source code in toast/ops/memory_counter.py
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 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
prefix = Unicode('', help='Prefix for log messages')
class-attribute
instance-attribute
silent = Bool(False, help='If True, return the memory used but do not log the result')
class-attribute
instance-attribute
sys_mem_str = ''
instance-attribute
total_bytes = 0
instance-attribute
__init__(**kwargs)
Source code in toast/ops/memory_counter.py
36 37 38 39 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/memory_counter.py
41 42 43 44 45 46 47 48 | |
_finalize(data, **kwargs)
Source code in toast/ops/memory_counter.py
50 51 52 53 54 55 56 57 58 59 60 61 62 | |
_provides()
Source code in toast/ops/memory_counter.py
67 68 | |
_requires()
Source code in toast/ops/memory_counter.py
64 65 | |
toast.ops.Statistics
Bases: Operator
Operator to measure and write out data statistics
Source code in toast/ops/statistics.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key to analyze')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
output_dir = Unicode(None, allow_none=True, help='If specified, write output data products to this directory')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_nonscience, help='Bit mask value for optional shared flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/statistics.py
90 91 92 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/statistics.py
83 84 85 86 87 88 | |
_check_det_mask(proposal)
Source code in toast/ops/statistics.py
69 70 71 72 73 74 | |
_check_shared_flag_mask(proposal)
Source code in toast/ops/statistics.py
76 77 78 79 80 81 | |
_exec(data, detectors=None, **kwargs)
Measure the statistics
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Data
|
The distributed data. |
required |
Source code in toast/ops/statistics.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | |
_finalize(data, **kwargs)
Source code in toast/ops/statistics.py
249 250 | |
_provides()
Source code in toast/ops/statistics.py
267 268 269 270 271 272 273 | |
_requires()
Source code in toast/ops/statistics.py
252 253 254 255 256 257 258 259 260 261 262 263 264 265 | |
toast.ops.Pipeline
Bases: Operator
Class representing a sequence of Operators.
This runs a list of other operators over sets of detectors (default is all
detectors in one shot). By default all observations are passed to each operator,
but the observation_key and observation_value traits can be used to run the
operators on only observations which have a matching key / value pair.
Source code in toast/ops/pipeline.py
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 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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
_staged_data = None
instance-attribute
_unstaged_data = None
instance-attribute
detector_sets = List(['ALL'], help="List of detector sets. ['ALL'] and ['SINGLE'] are also valid values.")
class-attribute
instance-attribute
operators = List([], help='List of Operator instances to run.')
class-attribute
instance-attribute
use_hybrid = Bool(True, help='Should the pipeline be allowed to use the GPU when it has some cpu-only operators.')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/pipeline.py
73 74 75 76 77 78 79 | |
__str__()
Converts the pipeline into a human-readable string.
Source code in toast/ops/pipeline.py
385 386 387 388 389 | |
_check_detsets(proposal)
Source code in toast/ops/pipeline.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
_check_operators(proposal)
Source code in toast/ops/pipeline.py
63 64 65 66 67 68 69 70 71 | |
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/pipeline.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | |
_exec_operator(op, data, detectors, pipe_accel)
Runs an operator, dealing with data movement to/from device if needed.
Source code in toast/ops/pipeline.py
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | |
_finalize(data, use_accel=None, **kwargs)
Source code in toast/ops/pipeline.py
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | |
_implementations()
Find implementations supported by all the operators
Source code in toast/ops/pipeline.py
353 354 355 356 357 358 359 360 361 362 363 364 365 | |
_pipe_accel(use_accel)
Source code in toast/ops/pipeline.py
305 306 307 308 309 310 311 312 313 314 315 316 | |
_provides()
Work through the operator list and prune intermediate products (that are be provided to an intermediate operator). FIXME could a final result also be used by an intermediate operator?
Source code in toast/ops/pipeline.py
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | |
_requires()
Work through the operator list in reverse order and prune intermediate products (that will be provided by a previous operator).
Source code in toast/ops/pipeline.py
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | |
_supports_accel()
Returns True if all the operators are accelerator compatible.
Source code in toast/ops/pipeline.py
367 368 369 370 371 372 373 374 | |
_supports_accel_partial()
Returns True if at least one of the operators is accelerator compatible.
Source code in toast/ops/pipeline.py
376 377 378 379 380 381 382 383 | |
toast.ops.RunSpt3g
Bases: Operator
Operator which runs a G3Pipeline.
This operator converts each observation to a stream of frames on each process
and then runs the specified G3 pipeline on the local frames. If the obs_import
trait is specified, the resulting frames are re-imported to a toast observation
at the end.
Source code in toast/ops/run_spt3g.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 128 129 130 131 132 133 134 135 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
modules = List([], help='List of tuples of (callable, **kwargs) that will passed to G3Pipeline.Add()')
class-attribute
instance-attribute
obs_export = Instance(klass=object, allow_none=True, help='Export class to create frames from an observation')
class-attribute
instance-attribute
obs_import = Instance(klass=object, allow_none=True, help='Import class to create observations from frame files')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/run_spt3g.py
70 71 72 73 | |
_check_export(proposal)
Source code in toast/ops/run_spt3g.py
52 53 54 55 56 57 58 59 | |
_check_import(proposal)
Source code in toast/ops/run_spt3g.py
61 62 63 64 65 66 67 68 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/run_spt3g.py
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 | |
_finalize(data, **kwargs)
Source code in toast/ops/run_spt3g.py
128 129 | |
_provides()
Source code in toast/ops/run_spt3g.py
134 135 | |
_requires()
Source code in toast/ops/run_spt3g.py
131 132 | |
Flagging
toast.ops.AzimuthIntervals
Bases: Operator
Build intervals that describe the scanning motion in azimuth.
This operator passes through the azimuth angle and builds the list of intervals for standard types of scanning / turnaround motion. Note that it only makes sense to use this operator for ground-based telescopes that primarily scan in azimuth rather than more complicated (e.g. lissajous) patterns.
Source code in toast/ops/azimuth_intervals.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
azimuth = Unicode(defaults.azimuth, help='Observation shared key for Azimuth')
class-attribute
instance-attribute
cut_long = Bool(True, help='If True, remove very long scanning intervals')
class-attribute
instance-attribute
cut_short = Bool(True, help='If True, remove very short scanning intervals')
class-attribute
instance-attribute
debug_root = Unicode(None, allow_none=True, help='If not None, dump debug plots to this root file name')
class-attribute
instance-attribute
long_limit = Quantity(1.25 * u.dimensionless_unscaled, help='Maximum length of a scan. Either the maximum length in time or a fraction of median scan length')
class-attribute
instance-attribute
scan_leftright_interval = Unicode(defaults.scan_leftright_interval, help='Interval name for left to right scans')
class-attribute
instance-attribute
scan_rightleft_interval = Unicode(defaults.scan_rightleft_interval, help='Interval name for right to left scans')
class-attribute
instance-attribute
scanning_interval = Unicode(defaults.scanning_interval, help='Interval name for scanning')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_invalid, help='Bit mask value for bad azimuth pointing')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
short_limit = Quantity(0.25 * u.dimensionless_unscaled, help='Minimum length of a scan. Either the minimum length in time or a fraction of median scan length')
class-attribute
instance-attribute
throw_interval = Unicode(defaults.throw_interval, help='Interval name for scan + turnaround intervals')
class-attribute
instance-attribute
throw_leftright_interval = Unicode(defaults.throw_leftright_interval, help='Interval name for left to right scans + turnarounds')
class-attribute
instance-attribute
throw_rightleft_interval = Unicode(defaults.throw_rightleft_interval, help='Interval name for right to left scans + turnarounds')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
turn_leftright_interval = Unicode(defaults.turn_leftright_interval, help='Interval name for turnarounds after left to right scans')
class-attribute
instance-attribute
turn_rightleft_interval = Unicode(defaults.turn_rightleft_interval, help='Interval name for turnarounds after right to left scans')
class-attribute
instance-attribute
turnaround_interval = Unicode(defaults.turnaround_interval, help='Interval name for turnarounds')
class-attribute
instance-attribute
window_seconds = Float(0.5, help='Smoothing window in seconds')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/azimuth_intervals.py
127 128 | |
_check_shared_flag_mask(proposal)
Source code in toast/ops/azimuth_intervals.py
120 121 122 123 124 125 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/azimuth_intervals.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 | |
_finalize(data, **kwargs)
Source code in toast/ops/azimuth_intervals.py
564 565 | |
_find_turnaround(vel)
Fit a polynomial and find the turnaround sample.
Source code in toast/ops/azimuth_intervals.py
528 529 530 531 532 533 534 535 536 537 | |
_gradient(data, window, flags=None)
Compute the numerical derivative with smoothing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
array
|
The local data buffer to process. |
required |
window
|
int
|
The number of samples in the smoothing window. |
required |
flags
|
array
|
The optional array of sample flags. |
None
|
Returns:
| Type | Description |
|---|---|
array
|
The result. |
Source code in toast/ops/azimuth_intervals.py
539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 | |
_provides()
Source code in toast/ops/azimuth_intervals.py
575 576 577 578 579 580 581 582 583 584 585 586 587 588 | |
_requires()
Source code in toast/ops/azimuth_intervals.py
567 568 569 570 571 572 573 | |
toast.ops.FlagIntervals
Bases: Operator
Operator which updates shared flags from interval lists.
This operator can be used in cases where interval information needs to be combined with shared flags. The view_mask trait is a list of tuples. Each tuple contains the name of the view (i.e. interval) to apply and the bitmask to use for that view. For each interval view, flag values in the shared_flags object are bitwise- OR'd with the specified mask for samples in the view. If the name of the view is prefixed with '~' the bitmask is applied to all samples outside the view.
Source code in toast/ops/flag_intervals.py
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 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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
reset = Bool(False, help='If True, flag bits are first set to 0 for the entire observation')
class-attribute
instance-attribute
shared_flag_bytes = Int(1, help='If creating shared key, use this many bytes per sample')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
view_mask = List([], help='List of tuples of (view name, bit mask)')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/flag_intervals.py
62 63 | |
_check_flag_bytes(proposal)
Source code in toast/ops/flag_intervals.py
47 48 49 50 51 52 | |
_check_flag_mask(proposal)
Source code in toast/ops/flag_intervals.py
54 55 56 57 58 59 60 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/flag_intervals.py
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 | |
_finalize(data, **kwargs)
Source code in toast/ops/flag_intervals.py
126 127 | |
_provides()
Source code in toast/ops/flag_intervals.py
140 141 142 143 144 145 146 147 | |
_requires()
Source code in toast/ops/flag_intervals.py
129 130 131 132 133 134 135 136 137 138 | |
toast.ops.FlagSSO
Bases: Operator
Operator which flags detector data in the vicinity of solar system objects
Source code in toast/ops/flag_sso.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_sso, help='Bit mask to raise flags with')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
detector_pointing = Instance(klass=Operator, allow_none=True, help='Operator that translates boresight Az/El pointing into detector frame')
class-attribute
instance-attribute
sso_names = List([], help='Names of the SSOs, must be recognized by pyEphem')
class-attribute
instance-attribute
sso_radii = List([], help='Radii around the sources to flag')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/flag_sso.py
95 96 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/flag_sso.py
88 89 90 91 92 93 | |
_check_detector_pointing(proposal)
Source code in toast/ops/flag_sso.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/flag_sso.py
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 128 129 130 131 132 133 134 135 136 137 | |
_finalize(data, **kwargs)
Source code in toast/ops/flag_sso.py
205 206 | |
_flag_ssos(data, obs, dets, sso_azs, sso_els)
Flag the SSO for each detector in tod
Source code in toast/ops/flag_sso.py
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | |
_get_sso_positions(times, observer)
Calculate the SSO horizontal position
Source code in toast/ops/flag_sso.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | |
_provides()
Source code in toast/ops/flag_sso.py
217 218 219 220 221 222 223 | |
_requires()
Source code in toast/ops/flag_sso.py
208 209 210 211 212 213 214 215 | |
toast.ops.SimpleDeglitch
Bases: Operator
An operator that flags extreme detector samples.
Source code in toast/ops/simple_deglitch.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key to analyze')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
fill_gaps = Bool(True, help='Fill gaps with a trend line and white noise')
class-attribute
instance-attribute
glitch_limit = Float(5.0, help='Glitch detection threshold in units of RMS')
class-attribute
instance-attribute
glitch_mask = Int(defaults.det_mask_invalid, help='Bit mask value to apply at glitch positions')
class-attribute
instance-attribute
glitch_radius = Int(5, help='Number of additional samples to flag around a glitch')
class-attribute
instance-attribute
medfilt_kernel_size = Int(101, help='Median filter kernel width. Either 0 (full interval) or a positive odd number')
class-attribute
instance-attribute
net_factors = []
instance-attribute
nglitch_limit = Int(10, help='Maximum number of glitches in a view')
class-attribute
instance-attribute
nsample_min = Int(100, help='Minimum number of good samples in an interval.')
class-attribute
instance-attribute
rates = []
instance-attribute
reset_det_flags = Bool(False, help='Replace existing detector flags')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_nonscience, help='Bit mask value for optional shared flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
total_factors = []
instance-attribute
view = Unicode(None, allow_none=True, help='Find glitches in this view')
class-attribute
instance-attribute
weights_in = []
instance-attribute
weights_out = []
instance-attribute
__init__(**kwargs)
Source code in toast/ops/simple_deglitch.py
138 139 140 141 142 143 144 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/simple_deglitch.py
122 123 124 125 126 127 | |
_check_det_mask(proposal)
Source code in toast/ops/simple_deglitch.py
108 109 110 111 112 113 | |
_check_medfilt_kernel_size(proposal)
Source code in toast/ops/simple_deglitch.py
129 130 131 132 133 134 135 136 | |
_check_shared_flag_mask(proposal)
Source code in toast/ops/simple_deglitch.py
115 116 117 118 119 120 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/simple_deglitch.py
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | |
_finalize(data, **kwargs)
Source code in toast/ops/simple_deglitch.py
298 299 | |
_get_coupled_detectors(det, dets)
See if other detectors should be flagged symmetrically
Source code in toast/ops/simple_deglitch.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
_provides()
Source code in toast/ops/simple_deglitch.py
316 317 318 319 320 321 322 323 | |
_requires()
Source code in toast/ops/simple_deglitch.py
301 302 303 304 305 306 307 308 309 310 311 312 313 314 | |
toast.ops.SimpleJumpCorrect
Bases: Operator
An operator that identifies and corrects jumps in the data
Source code in toast/ops/simple_jumpcorrect.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
apply_jumps = Unicode(None, allow_none=True, help='Do not compute jumps, instead apply the specified dictionary of values')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key to analyze')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
filterlen = Int(100, help='Matched filter length')
class-attribute
instance-attribute
jump_limit = Float(5.0, help='Jump detection threshold in units of RMS')
class-attribute
instance-attribute
jump_mask = Int(defaults.det_mask_invalid, help='Bit mask value to apply at glitch positions')
class-attribute
instance-attribute
jump_radius = Int(5, help='Number of additional samples to flag around a jump')
class-attribute
instance-attribute
njump_limit = Int(10, help='If the detector has more than `njump_limit` jumps the detector the detector and time stream will be flagged as invalid.')
class-attribute
instance-attribute
nsample_min = Int(100, help='Minimum number of good samples in an interval')
class-attribute
instance-attribute
phase = Unicode(defaults.azimuth, allow_none=True, help='Observation shared key for scan phase (to reject scan-synchronous jumps)')
class-attribute
instance-attribute
phase_tol = Float(np.radians(1.0), help='When `phase` is not None, jumps closer than `phase_tol` are synchronous and not corrected')
class-attribute
instance-attribute
reset_det_flags = Bool(False, help='Replace existing detector flags')
class-attribute
instance-attribute
save_jumps = Unicode(None, allow_none=True, help='Save the jump corrections to a dictionary of values per observation')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_nonscience, help='Bit mask value for optional shared flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
stepfilter = self._get_stepfilter(self.filterlen)
instance-attribute
view = Unicode(None, allow_none=True, help='Find jumps in this view')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/simple_jumpcorrect.py
162 163 164 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/simple_jumpcorrect.py
148 149 150 151 152 153 | |
_check_det_mask(proposal)
Source code in toast/ops/simple_jumpcorrect.py
127 128 129 130 131 132 | |
_check_phase_tol(proposal)
Source code in toast/ops/simple_jumpcorrect.py
155 156 157 158 159 160 | |
_check_shared_flag_mask(proposal)
Source code in toast/ops/simple_jumpcorrect.py
134 135 136 137 138 139 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/simple_jumpcorrect.py
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 | |
_finalize(data, **kwargs)
Source code in toast/ops/simple_jumpcorrect.py
392 393 | |
_find_jumps(sig, bad, jumps=None, phase=None, offset=0)
Locate all jumps in sig using a matched filter
Source code in toast/ops/simple_jumpcorrect.py
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | |
_find_peaks(toi, flag, lim=3.0, tol=10000.0, sigma_in=None)
Find the peaks and their amplitudes in the match-filtered TOI. Inputs: lim -- threshold for jump detection in units of filtered TOI RMS. tol -- radius of a region to mask from further peak finding upon detecting a peak. sigma_in -- an estimate of filtered TOI RMS that overrides the sample variance otherwise used.
Source code in toast/ops/simple_jumpcorrect.py
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | |
_get_sigma(toi, flag, tol)
Measure the median flagged standard deviation of toi over windows of size 2 * tol
Source code in toast/ops/simple_jumpcorrect.py
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | |
_get_stepfilter(m)
Return the time domain matched filter kernel of length m.
Source code in toast/ops/simple_jumpcorrect.py
166 167 168 169 170 171 172 173 174 175 176 177 178 | |
_provides()
Source code in toast/ops/simple_jumpcorrect.py
410 411 412 413 414 415 416 417 | |
_remove_jumps(signal, flag, jumps)
Removes the jumps described by peaks from x. Adds a buffer of flags with radius of tol.
Source code in toast/ops/simple_jumpcorrect.py
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | |
_requires()
Source code in toast/ops/simple_jumpcorrect.py
395 396 397 398 399 400 401 402 403 404 405 406 407 408 | |
toast.ops.FillGaps
Bases: Operator
Operator that fills flagged samples with noise.
Currently this operator just fills flagged samples with a simple polynomial plus white noise. It is mostly used for visualization. No attempt is made yet to fill the gaps with a constrained noise realization.
Source code in toast/ops/fill_gaps.py
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 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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
buffer = Quantity(1.0 * u.s, help='Buffer of time on either side of each gap')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
poly_order = Int(1, help='Order of the polynomial to fit across each gap')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_invalid, help='Bit mask value for optional shared flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/fill_gaps.py
103 104 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/fill_gaps.py
89 90 91 92 93 94 | |
_check_det_mask(proposal)
Source code in toast/ops/fill_gaps.py
82 83 84 85 86 87 | |
_check_poly_order(proposal)
Source code in toast/ops/fill_gaps.py
75 76 77 78 79 80 | |
_check_shared_flag_mask(proposal)
Source code in toast/ops/fill_gaps.py
96 97 98 99 100 101 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/fill_gaps.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | |
_finalize(data, **kwargs)
Source code in toast/ops/fill_gaps.py
162 163 | |
_provides()
Source code in toast/ops/fill_gaps.py
178 179 180 181 182 183 | |
_requires()
Source code in toast/ops/fill_gaps.py
165 166 167 168 169 170 171 172 173 174 175 176 | |
Filtering
Polynomial Filters
toast.ops.CommonModeFilter
Bases: Operator
Operator to regress out common mode at each time stamp.
Source code in toast/ops/polyfilter/polyfilter.py
651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key apply filtering to')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid | defaults.det_mask_processing, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid | defaults.det_mask_processing, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
focalplane_key = Unicode(None, allow_none=True, help='Which focalplane key to match')
class-attribute
instance-attribute
pattern = Unicode(f'.*', allow_none=True, help='Regex pattern to match against detector names. Only detectors that match the pattern are filtered.')
class-attribute
instance-attribute
plot = Bool(False, help='If True, plot regression coefficients')
class-attribute
instance-attribute
redistribute = Bool(False, help='If True, redistribute data before and after filtering for optimal data locality.')
class-attribute
instance-attribute
regress = Bool(False, help='If True, regress the common mode rather than subtract')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_invalid, help='Bit mask value for optional shared flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/polyfilter/polyfilter.py
740 741 742 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/polyfilter/polyfilter.py
733 734 735 736 737 738 | |
_check_det_mask(proposal)
Source code in toast/ops/polyfilter/polyfilter.py
719 720 721 722 723 724 | |
_check_shared_flag_mask(proposal)
Source code in toast/ops/polyfilter/polyfilter.py
726 727 728 729 730 731 | |
_exec(data, detectors=None, use_accel=None, **kwargs)
Apply the common mode filter to the signal.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Data
|
The distributed data. |
required |
Source code in toast/ops/polyfilter/polyfilter.py
858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 | |
_finalize(data, **kwargs)
Source code in toast/ops/polyfilter/polyfilter.py
990 991 | |
_plot_coeff(ob, coeffs, comm, value)
Source code in toast/ops/polyfilter/polyfilter.py
805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 | |
_provides()
Source code in toast/ops/polyfilter/polyfilter.py
1005 1006 1007 1008 1009 1010 1011 | |
_re_redistribute(data, obs, timer, log, temp_ob)
Source code in toast/ops/polyfilter/polyfilter.py
782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 | |
_redistribute(data, obs, timer, log)
Source code in toast/ops/polyfilter/polyfilter.py
744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 | |
_requires()
Source code in toast/ops/polyfilter/polyfilter.py
993 994 995 996 997 998 999 1000 1001 1002 1003 | |
toast.ops.PolyFilter
Bases: Operator
Operator which applies polynomial filtering to the TOD.
Source code in toast/ops/polyfilter/polyfilter.py
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key apply filtering to')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid | defaults.det_mask_processing, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid | defaults.det_mask_processing, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
order = Int(1, allow_none=False, help='Polynomial order')
class-attribute
instance-attribute
pattern = Unicode(f'.*', allow_none=True, help='Regex pattern to match against detector names. Only detectors that match the pattern are filtered.')
class-attribute
instance-attribute
poly_flag_mask = Int(defaults.shared_mask_invalid, help='Shared flag bit mask for samples outside of filtering view')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_nonscience, help='Bit mask value for optional shared flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
view = Unicode('throw', allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/polyfilter/polyfilter.py
509 510 511 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/polyfilter/polyfilter.py
502 503 504 505 506 507 | |
_check_det_mask(proposal)
Source code in toast/ops/polyfilter/polyfilter.py
488 489 490 491 492 493 | |
_check_shared_flag_mask(proposal)
Source code in toast/ops/polyfilter/polyfilter.py
495 496 497 498 499 500 | |
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/polyfilter/polyfilter.py
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 | |
_finalize(data, **kwargs)
Source code in toast/ops/polyfilter/polyfilter.py
626 627 | |
_provides()
Source code in toast/ops/polyfilter/polyfilter.py
642 643 644 645 646 647 648 | |
_requires()
Source code in toast/ops/polyfilter/polyfilter.py
629 630 631 632 633 634 635 636 637 638 639 640 | |
toast.ops.PolyFilter2D
Bases: Operator
Operator to regress out 2D polynomials across the focal plane.
Source code in toast/ops/polyfilter/polyfilter.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 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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key apply filtering to')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid | defaults.det_mask_processing, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid | defaults.det_mask_processing, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
focalplane_key = Unicode(None, allow_none=True, help='Which focalplane key to match')
class-attribute
instance-attribute
order = Int(1, allow_none=False, help='Polynomial order')
class-attribute
instance-attribute
pattern = Unicode(f'.*', allow_none=True, help='Regex pattern to match against detector names. Only detectors that match the pattern are filtered.')
class-attribute
instance-attribute
poly_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for samples that fail to filter')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_invalid, help='Bit mask value for optional shared flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/polyfilter/polyfilter.py
115 116 117 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/polyfilter/polyfilter.py
108 109 110 111 112 113 | |
_check_det_mask(proposal)
Source code in toast/ops/polyfilter/polyfilter.py
94 95 96 97 98 99 | |
_check_shared_flag_mask(proposal)
Source code in toast/ops/polyfilter/polyfilter.py
101 102 103 104 105 106 | |
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/polyfilter/polyfilter.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | |
_finalize(data, **kwargs)
Source code in toast/ops/polyfilter/polyfilter.py
406 407 | |
_provides()
Source code in toast/ops/polyfilter/polyfilter.py
424 425 426 427 428 429 430 | |
_requires()
Source code in toast/ops/polyfilter/polyfilter.py
409 410 411 412 413 414 415 416 417 418 419 420 421 422 | |
Specialized Filters
toast.ops.GroundFilter
Bases: Operator
Operator that applies ground template filtering to azimuthal scans.
Source code in toast/ops/groundfilter.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
azimuth = Unicode(defaults.azimuth, allow_none=True, help='Observation shared key for Azimuth')
class-attribute
instance-attribute
bin_width = Quantity(None, allow_none=True, help='Azimuthal bin width of ground filter')
class-attribute
instance-attribute
boresight_azel = Unicode(defaults.boresight_azel, allow_none=True, help='Observation shared key for boresight Az/El')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
detrend = Bool(False, help='Subtract the fitted trend along with the ground template')
class-attribute
instance-attribute
filter_order = Int(5, allow_none=True, help='Order of a Legendre polynomial to fit as a function of azimuth.')
class-attribute
instance-attribute
ground_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask to use when adding flags based on ground filter failures.')
class-attribute
instance-attribute
leftright_interval = Unicode(defaults.throw_leftright_interval, help='Intervals for left-to-right scans')
class-attribute
instance-attribute
rightleft_interval = Unicode(defaults.throw_rightleft_interval, help='Intervals for right-to-left scans')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_invalid, help='Bit mask value for optional shared flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
split_template = Bool(False, help='Apply a different template for left and right scans')
class-attribute
instance-attribute
trend_order = Int(5, allow_none=True, help='Order of a Legendre polynomial to fit along with the ground template.')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/groundfilter.py
196 197 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/groundfilter.py
161 162 163 164 165 166 | |
_check_det_mask(proposal)
Source code in toast/ops/groundfilter.py
154 155 156 157 158 159 | |
_check_filter_order(proposal)
Source code in toast/ops/groundfilter.py
189 190 191 192 193 194 | |
_check_shared_flag_mask(proposal)
Source code in toast/ops/groundfilter.py
168 169 170 171 172 173 | |
_check_trend_order(proposal)
Source code in toast/ops/groundfilter.py
175 176 177 178 179 180 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/groundfilter.py
386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 | |
_finalize(data, **kwargs)
Source code in toast/ops/groundfilter.py
509 510 | |
_make_bin_templates(az)
Source code in toast/ops/groundfilter.py
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | |
_make_poly_templates(phase)
Evaluate Legendre polynomial templates up to the requested order
Source code in toast/ops/groundfilter.py
217 218 219 220 221 222 223 224 | |
_provides()
Source code in toast/ops/groundfilter.py
527 528 | |
_requires()
Source code in toast/ops/groundfilter.py
512 513 514 515 516 517 518 519 520 521 522 523 524 525 | |
_split_templates(templates, obs)
Create separate templates for left and right-going scans
Source code in toast/ops/groundfilter.py
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | |
build_templates(obs)
Construct the local ground template hierarchy
Source code in toast/ops/groundfilter.py
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | |
fit_templates(obs, templates, ref, good, last_good, last_invcov, last_cov, last_rcond)
Source code in toast/ops/groundfilter.py
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 | |
subtract_templates(ref, good, coeff, templates)
Source code in toast/ops/groundfilter.py
375 376 377 378 379 380 381 382 383 384 | |
toast.ops.MitigateCrossTalk
Bases: Operator
-
The cross talk matrix can just be a dictionary of dictionaries of values (i.e. a sparse matrix) on every process. It does not need to be a dense matrix loaded from an HDF5 file. The calling code can create this however it likes.
-
Each process has a DetectorData object representing the local data for some detectors and some timespan (e.g. obs.detdata["signal"]). It can make a copy of this and pass it to the next rank in the grid column. Each process receives a copy from the previous process in the column, accumulates to its local detectors, and passes it along. This continues until every process has accumulated the data from the other processes in the column.
Source code in toast/ops/sim_crosstalk.py
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data = Unicode(None, allow_none=True, help='Observation detdata key for the timestream data')
class-attribute
instance-attribute
error_coefficients = Float(0, help='relative amplitude to simulate crosstalk errors on the inverse matrix ')
class-attribute
instance-attribute
realization = Int(0, help='integer to set a different random seed ')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
xtalk_mat_file = Unicode(None, allow_none=True, help='CrossTalk matrix dictionary of dictionaries')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/sim_crosstalk.py
388 389 | |
_exec(data, **kwargs)
Source code in toast/ops/sim_crosstalk.py
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 | |
_finalize(data, **kwargs)
Source code in toast/ops/sim_crosstalk.py
451 452 | |
_provides()
Source code in toast/ops/sim_crosstalk.py
467 468 469 470 471 472 473 474 475 | |
_requires()
Source code in toast/ops/sim_crosstalk.py
454 455 456 457 458 459 460 461 462 463 464 465 | |
Half Wave Plate Tools
toast.ops.HWPSynchronousModel
Bases: Operator
Operator that models and removes HWP synchronous signal.
This fits and optionally subtracts a Maxipol / EBEX style model for the HWPSS.
The time dependent drift term is optional. See the details in
toast.hwp_utils.hwpss_compute_coeff_covariance().
The 2f component of the model is optionally used to build a relative calibration between detectors, either as a fixed table per observation or as continuously varying factors.
The HWPSS model can be constructed either with one set of template coefficients for the entire observation, or one set per time interval smoothly interpolated across the observation.
Source code in toast/ops/hwpss_model.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
chunk_time = Quantity(None, allow_none=True, help='The overlapping time chunks over which to compute the HWPSS template')
class-attribute
instance-attribute
chunk_view = Unicode(None, allow_none=True, help='The intervals over which to independently compute the HWPSS template')
class-attribute
instance-attribute
debug = Unicode(None, allow_none=True, help='Path to directory for generating debug plots')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
fill_gaps = Bool(False, help='If True, fill gaps with a simple noise model')
class-attribute
instance-attribute
harmonics = Int(9, help='Number of harmonics to consider in the expansion')
class-attribute
instance-attribute
hwp_angle = Unicode(defaults.hwp_angle, allow_none=True, help='Observation shared key for HWP angle')
class-attribute
instance-attribute
hwp_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask to use when adding flags based on HWP filter failures.')
class-attribute
instance-attribute
relcal_continuous = Unicode(None, allow_none=True, help='Build interpolated relative calibration timestreams')
class-attribute
instance-attribute
relcal_cut_sigma = Float(5.0, help='Sigma cut for outlier rejection based on relative calibration')
class-attribute
instance-attribute
relcal_fixed = Unicode(None, allow_none=True, help='Build a relative calibration dictionary in this observation key')
class-attribute
instance-attribute
save_model = Unicode(None, allow_none=True, help='Save the model to this observation key')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_invalid, help='Bit mask value for optional shared flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
subtract_model = Bool(False, help='Subtract the model from the input data')
class-attribute
instance-attribute
time_drift = Bool(False, help='If True, include time drift terms in the model')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/hwpss_model.py
165 166 | |
_average_magnitude(dets, coeff, coeff_flags)
Source code in toast/ops/hwpss_model.py
734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 | |
_build_model(obs, reltime, sincos, sh_flags, det_flags, det_name, det_mag, chunks, ch_coeff, coeff_flags, min_smooth=4)
Source code in toast/ops/hwpss_model.py
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/hwpss_model.py
144 145 146 147 148 149 | |
_check_det_mask(proposal)
Source code in toast/ops/hwpss_model.py
137 138 139 140 141 142 | |
_check_harmonics(proposal)
Source code in toast/ops/hwpss_model.py
158 159 160 161 162 163 | |
_check_shared_flag_mask(proposal)
Source code in toast/ops/hwpss_model.py
151 152 153 154 155 156 | |
_compute_chunking(obs, reltime)
Source code in toast/ops/hwpss_model.py
838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 | |
_compute_flags(obs, dets)
Source code in toast/ops/hwpss_model.py
898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 | |
_cut_outliers(obs, det_mag)
Source code in toast/ops/hwpss_model.py
678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/hwpss_model.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 | |
_finalize(data, **kwargs)
Source code in toast/ops/hwpss_model.py
939 940 | |
_fit_chunk(obs, dets, indx, start, end, sincos, sh_flags, det_flags, reltime, coeff, coeff_flags)
Source code in toast/ops/hwpss_model.py
762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 | |
_plot_model(obs, det_name, reltime, sincos, sh_flags, det_flags, model, chunks, chunk_coeff, first, last)
Source code in toast/ops/hwpss_model.py
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 | |
_provides()
Source code in toast/ops/hwpss_model.py
955 956 957 958 959 960 961 962 963 964 965 966 | |
_requires()
Source code in toast/ops/hwpss_model.py
942 943 944 945 946 947 948 949 950 951 952 953 | |
_stopped_flags(obs)
Source code in toast/ops/hwpss_model.py
930 931 932 933 934 935 936 937 | |
_store_model(obs, dets, chunks, coeff, coeff_flags)
Source code in toast/ops/hwpss_model.py
656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 | |
toast.ops.HWPFilter
Bases: Operator
Operator that applies HWP-synchronous signal filtering.
Source code in toast/ops/hwpfilter.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
detrend = Bool(False, help='Subtract the fitted trend along with the ground template')
class-attribute
instance-attribute
filter_order = Int(5, help='Order of a Fourier expansion to fit as a function of HWP angle.')
class-attribute
instance-attribute
hwp_angle = Unicode(defaults.hwp_angle, allow_none=True, help='Observation shared key for HWP angle')
class-attribute
instance-attribute
hwp_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask to use when adding flags based on HWP filter failures.')
class-attribute
instance-attribute
save_amplitudes = Unicode(None, allow_none=True, help='Store the template amplitudes in observation metadata using this key.')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_invalid, help='Bit mask value for optional shared flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
trend_order = Int(5, help='Order of a Legendre polynomial to fit along with the HWPSS template.')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/hwpfilter.py
160 161 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/hwpfilter.py
132 133 134 135 136 137 | |
_check_det_mask(proposal)
Source code in toast/ops/hwpfilter.py
125 126 127 128 129 130 | |
_check_filter_order(proposal)
Source code in toast/ops/hwpfilter.py
153 154 155 156 157 158 | |
_check_shared_flag_mask(proposal)
Source code in toast/ops/hwpfilter.py
139 140 141 142 143 144 | |
_check_trend_order(proposal)
Source code in toast/ops/hwpfilter.py
146 147 148 149 150 151 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/hwpfilter.py
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | |
_finalize(data, **kwargs)
Source code in toast/ops/hwpfilter.py
397 398 | |
_provides()
Source code in toast/ops/hwpfilter.py
415 416 | |
_requires()
Source code in toast/ops/hwpfilter.py
400 401 402 403 404 405 406 407 408 409 410 411 412 413 | |
build_templates(obs)
Construct the local HWPSS template hierarchy
Source code in toast/ops/hwpfilter.py
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | |
fit_templates(obs, templates, ref, good, last_good, last_invcov, last_cov, last_rcond)
Source code in toast/ops/hwpfilter.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | |
record_coeff(obs, det, coeff)
Source code in toast/ops/hwpfilter.py
247 248 249 250 251 252 | |
subtract_templates(ref, good, coeff, legendre_trend, fourier_filter)
Source code in toast/ops/hwpfilter.py
254 255 256 257 258 259 260 261 262 263 264 265 | |
toast.ops.Demodulate
Bases: Operator
Demodulate and downsample HWP-modulated data
Source code in toast/ops/demodulation.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
allowed_modes = ('', 'I', 'QU', 'IQU')
class-attribute
instance-attribute
demod_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for demod & downsample flagging')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help="Observation detdata key apply filtering to. Use ';' if multiple signal flavors should be demodulated.")
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
do_2f = Bool(False, help='also cache the 2f-demodulated signal')
class-attribute
instance-attribute
fcut = Float(0.95, help='Low pass cut-off frequency in units if HWP frequency')
class-attribute
instance-attribute
fmax_2f = Float(2.95, help='High frequency end of the 2f-bandpass filter in units of HWP frequency')
class-attribute
instance-attribute
fmax_4f = Float(4.95, help='High frequency end of the 4fbandpass filter in units of HWP frequency')
class-attribute
instance-attribute
fmin_2f = Float(1.05, help='Low frequency end of the 2f-bandpass filter in units of HWP frequency')
class-attribute
instance-attribute
fmin_4f = Float(3.05, help='Low frequency end of the 4f-bandpass filter in units of HWP frequency')
class-attribute
instance-attribute
hwp_angle = Unicode(defaults.hwp_angle, help='Observation shared key for HWP angle')
class-attribute
instance-attribute
in_place = Bool(False, help='Modify the data object in-place. Implies purge=True.')
class-attribute
instance-attribute
keep_dets_frac = Float(0.1, help='If less than this fraction of detectors are good, cut the observation')
class-attribute
instance-attribute
mode = Unicode('IQU', help='Return I, QU or IQU timestreams.')
class-attribute
instance-attribute
noise_model = Unicode('noise_model', allow_none=True, help='Observation key containing the noise model')
class-attribute
instance-attribute
nskip = Int(3, help='Downsampling factor')
class-attribute
instance-attribute
purge = Bool(False, help='Remove inputs after demodulation')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_invalid, help='Bit mask value for optional shared flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
stokes_weights = Instance(klass=Operator, allow_none=True, help='This must be an instance of a Stokes weights operator')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
window = Unicode('hamming', help='Window function name recognized by scipy.signal.firwin')
class-attribute
instance-attribute
wkernel = Int(None, allow_none=True, help='Override automatic filter kernel size')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/demodulation.py
236 237 238 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/demodulation.py
194 195 196 197 198 199 | |
_check_det_mask(proposal)
Source code in toast/ops/demodulation.py
187 188 189 190 191 192 | |
_check_mode(proposal)
Source code in toast/ops/demodulation.py
228 229 230 231 232 233 234 | |
_check_shared_mask(proposal)
Source code in toast/ops/demodulation.py
201 202 203 204 205 206 | |
_check_stokes_weights(proposal)
Source code in toast/ops/demodulation.py
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | |
_demodulate_detsets(obs, all_dets)
In order to force local detectors to remain on their original process, we create a detector set for each row of the process grid.
Source code in toast/ops/demodulation.py
571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 | |
_demodulate_flag(flags, wkernel, offset)
Collapse flags inside the filter window and downsample
Source code in toast/ops/demodulation.py
641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 | |
_demodulate_flags(obs, demod_obs, dets, wkernel, offset)
Demodulate and downsample flags
Source code in toast/ops/demodulation.py
730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 | |
_demodulate_intervals(obs, demod_obs)
Source code in toast/ops/demodulation.py
628 629 630 631 632 633 634 635 636 637 638 639 | |
_demodulate_noise(obs, demod_obs, dets, fsample, hwp_rate, lowpass, bandpass2f, bandpass4f)
Add Noise objects for the new detectors
Source code in toast/ops/demodulation.py
754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 | |
_demodulate_sample_sets(obs)
Source code in toast/ops/demodulation.py
608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 | |
_demodulate_shared_data(obs, demod_obs)
Downsample shared data
Source code in toast/ops/demodulation.py
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 | |
_demodulate_signal(data, obs, demod_obs, dets, lowpass, bandpass2f, bandpass4f)
demodulate signal TOD
Source code in toast/ops/demodulation.py
668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 | |
_demodulate_telescope(obs, all_dets)
Source code in toast/ops/demodulation.py
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 | |
_demodulated_samples(obs)
Compute number of samples in the demodulated observation.
Source code in toast/ops/demodulation.py
504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/demodulation.py
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | |
_finalize(data, **kwargs)
Source code in toast/ops/demodulation.py
836 837 | |
_get_fmod(obs)
Return the modulation frequency
Source code in toast/ops/demodulation.py
446 447 448 449 450 451 452 453 454 | |
_get_wkernel(fmax, fsample)
Source code in toast/ops/demodulation.py
456 457 458 459 460 461 462 463 | |
_provides()
Source code in toast/ops/demodulation.py
848 849 | |
_requires()
Source code in toast/ops/demodulation.py
839 840 841 842 843 844 845 846 | |
toast.ops.StokesWeightsDemod
Bases: Operator
Compute the Stokes pointing weights for demodulated data
Source code in toast/ops/demodulation.py
852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
allowed_modes = ('I', 'QU', 'IQU')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
detector_pointing_in = Instance(klass=Operator, allow_none=True, help='Pointing operator in the native Q/U frame, typically az/el. Must be set if `detector_pointing_out` is set. Has no effect if `detector_pointing_out` is not set.')
class-attribute
instance-attribute
detector_pointing_out = Instance(klass=Operator, allow_none=True, help='Pointing operator for the desired frame, typically RA/Dec. Requires `detector_pointing_in` to be set.')
class-attribute
instance-attribute
mode = Unicode('IQU', help='The Stokes weights to generate')
class-attribute
instance-attribute
single_precision = Bool(False, help='If True, use 32bit float in output')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
weights = Unicode(defaults.weights, help='Observation detdata key for output weights')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/demodulation.py
985 986 | |
_check_detector_pointing_in(proposal)
Source code in toast/ops/demodulation.py
900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 | |
_check_detector_pointing_out(proposal)
Source code in toast/ops/demodulation.py
924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 | |
_check_mode(proposal)
Source code in toast/ops/demodulation.py
892 893 894 895 896 897 898 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/demodulation.py
988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 | |
_finalize(data, **kwargs)
Source code in toast/ops/demodulation.py
1074 1075 | |
_get_delta(data, ob, det)
Get the polarization angle in the input and output frames to rotate Q and U accordingly
Source code in toast/ops/demodulation.py
948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 | |
_provides()
Source code in toast/ops/demodulation.py
1084 1085 | |
_requires()
Source code in toast/ops/demodulation.py
1077 1078 1079 1080 1081 1082 | |
Pointing Matrix
toast.ops.PointingDetectorSimple
Bases: Operator
Operator which translates boresight pointing into detector frame
Source code in toast/ops/pointing_detector/pointing_detector.py
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 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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
boresight = Unicode(defaults.boresight_radec, help='Observation shared key for boresight')
class-attribute
instance-attribute
coord_in = Unicode(None, allow_none=True, help="The input boresight coordinate system ('C', 'E', 'G')")
class-attribute
instance-attribute
coord_out = Unicode(None, allow_none=True, help="The output coordinate system ('C', 'E', 'G')")
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
hwp_angle = Unicode(defaults.hwp_angle, allow_none=True, help='Observation shared key for HWP angle')
class-attribute
instance-attribute
hwp_angle_offset = Quantity(0 * u.deg, help='HWP angle offset to apply when constructing deflection')
class-attribute
instance-attribute
hwp_deflection_radius = Quantity(None, allow_none=True, help='If non-zero, nominal detector pointing will be deflected in a circular pattern according to HWP phase.')
class-attribute
instance-attribute
quats = Unicode(defaults.quats, allow_none=True, help='Observation detdata key for output quaternions')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_invalid, help='Bit mask value for optional flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/pointing_detector/pointing_detector.py
113 114 | |
_check_coord_in(proposal)
Source code in toast/ops/pointing_detector/pointing_detector.py
90 91 92 93 94 95 96 | |
_check_coord_out(proposal)
Source code in toast/ops/pointing_detector/pointing_detector.py
98 99 100 101 102 103 104 | |
_check_det_mask(proposal)
Source code in toast/ops/pointing_detector/pointing_detector.py
83 84 85 86 87 88 | |
_check_flag_mask(proposal)
Source code in toast/ops/pointing_detector/pointing_detector.py
106 107 108 109 110 111 | |
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/pointing_detector/pointing_detector.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | |
_finalize(data, **kwargs)
Source code in toast/ops/pointing_detector/pointing_detector.py
291 292 | |
_implementations()
Source code in toast/ops/pointing_detector/pointing_detector.py
315 316 317 318 319 320 321 | |
_provides()
Source code in toast/ops/pointing_detector/pointing_detector.py
307 308 309 310 311 312 313 | |
_requires()
Source code in toast/ops/pointing_detector/pointing_detector.py
294 295 296 297 298 299 300 301 302 303 304 305 | |
_supports_accel()
Source code in toast/ops/pointing_detector/pointing_detector.py
323 324 | |
toast.ops.PixelsHealpix
Bases: Operator
Operator which generates healpix pixel numbers.
If the view trait is not specified, then this operator will use the same data view as the detector pointing operator when computing the pointing matrix pixels.
Any samples with "bad" pointing should have already been set to a "safe" quaternion value by the detector pointing operator. We use the same shared flags as the detector pointing operator.
Source code in toast/ops/pixels_healpix/pixels_healpix.py
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 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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
create_dist = Unicode(None, allow_none=True, help='Create the submap distribution for all detectors and store in the Data key specified')
class-attribute
instance-attribute
detector_pointing = Instance(klass=Operator, allow_none=True, help='Operator that translates boresight pointing into detector frame')
class-attribute
instance-attribute
nest = Bool(True, help='If True, use NESTED ordering instead of RING')
class-attribute
instance-attribute
nside = Int(64, help='The NSIDE resolution')
class-attribute
instance-attribute
nside_submap = Int(16, help='The NSIDE of the submap resolution')
class-attribute
instance-attribute
pixels = Unicode(defaults.pixels, help='Observation detdata key for output pixel indices')
class-attribute
instance-attribute
single_precision = Bool(False, help='If True, use 32bit int in output')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/pixels_healpix/pixels_healpix.py
113 114 115 116 117 118 | |
_check_detector_pointing(proposal)
Source code in toast/ops/pixels_healpix/pixels_healpix.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
_check_nside(proposal)
Source code in toast/ops/pixels_healpix/pixels_healpix.py
88 89 90 91 92 93 94 95 | |
_check_nside_submap(proposal)
Source code in toast/ops/pixels_healpix/pixels_healpix.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/pixels_healpix/pixels_healpix.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | |
_finalize(data, use_accel=None, **kwargs)
Source code in toast/ops/pixels_healpix/pixels_healpix.py
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | |
_implementations()
Source code in toast/ops/pixels_healpix/pixels_healpix.py
313 314 315 316 317 318 319 | |
_provides()
Source code in toast/ops/pixels_healpix/pixels_healpix.py
306 307 308 309 310 311 | |
_requires()
Source code in toast/ops/pixels_healpix/pixels_healpix.py
297 298 299 300 301 302 303 304 | |
_reset_hpix(change)
Source code in toast/ops/pixels_healpix/pixels_healpix.py
120 121 122 123 124 125 126 127 128 129 130 131 | |
_set_hpix(nside, nside_submap)
Source code in toast/ops/pixels_healpix/pixels_healpix.py
133 134 135 136 137 | |
_supports_accel()
Source code in toast/ops/pixels_healpix/pixels_healpix.py
321 322 323 324 325 326 327 | |
toast.ops.PixelsWCS
Bases: Operator
Operator which generates detector pixel indices defined on a flat projection.
When placing the projection on the sky, either the center or bounds
traits must be specified, but not both.
When determining the pixel density in the projection, exactly two traits from the
set of bounds, resolution and dimensions must be specified.
If the view trait is not specified, then this operator will use the same data view as the detector pointing operator when computing the pointing matrix pixels.
This uses the astropy wcs utilities to build the projection parameters. Eventually
this operator will use internal kernels for the projection unless use_astropy
is set to True.
Source code in toast/ops/pixels_wcs.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
_done_auto = False
instance-attribute
_done_wcs = False
instance-attribute
auto_bounds = Bool(True, help='If True, set the bounding box based on boresight and field of view')
class-attribute
instance-attribute
bounds = Tuple(tuple(), help='The (lon_min, lon_max, lat_min, lat_max) values (Quantities)')
class-attribute
instance-attribute
center = Tuple(tuple(), help='The center Lon/Lat coordinates (Quantities) of the projection')
class-attribute
instance-attribute
center_offset = Unicode(None, allow_none=True, help='Optional name of shared field with lon, lat offset in degrees')
class-attribute
instance-attribute
coord_frame = Unicode('EQU', help='Supported values are AZEL, EQU, GAL, ECL')
class-attribute
instance-attribute
create_dist = Unicode(None, allow_none=True, help='Create the submap distribution for all detectors and store in the Data key specified')
class-attribute
instance-attribute
detector_pointing = Instance(klass=Operator, allow_none=True, help='Operator that translates boresight pointing into detector frame')
class-attribute
instance-attribute
dimensions = Tuple((1000, 1000), help='The Lon/Lat pixel dimensions of the projection')
class-attribute
instance-attribute
fits_header = Unicode(None, allow_none=True, help='FITS file containing header to use with pre-existing WCS parameters')
class-attribute
instance-attribute
pixels = Unicode('pixels', help='Observation detdata key for output pixel indices')
class-attribute
instance-attribute
projection = Unicode('CAR', help='Supported values are CAR, CEA, MER, ZEA, TAN, SFL')
class-attribute
instance-attribute
resolution = Tuple(tuple(), help='The Lon/Lat projection resolution (Quantities) along the 2 axes')
class-attribute
instance-attribute
single_precision = Bool(False, help='If True, use 32bit int in output')
class-attribute
instance-attribute
submaps = Int(1, help='Number of submaps to use')
class-attribute
instance-attribute
use_astropy = Bool(True, help='If True, use astropy for world to pix conversion')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/pixels_wcs.py
158 159 160 161 162 163 | |
_check_detector_pointing(proposal)
Source code in toast/ops/pixels_wcs.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
_check_wcs_projection(proposal)
Source code in toast/ops/pixels_wcs.py
151 152 153 154 155 156 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/pixels_wcs.py
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 | |
_finalize(data, **kwargs)
Source code in toast/ops/pixels_wcs.py
622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 | |
_provides()
Source code in toast/ops/pixels_wcs.py
655 656 657 658 659 660 | |
_requires()
Source code in toast/ops/pixels_wcs.py
646 647 648 649 650 651 652 653 | |
_reset_auto_bounds(change)
Source code in toast/ops/pixels_wcs.py
165 166 167 168 169 170 171 172 | |
_reset_auto_center(change)
Source code in toast/ops/pixels_wcs.py
174 175 176 177 178 179 180 181 | |
_reset_wcs(change)
Source code in toast/ops/pixels_wcs.py
183 184 185 186 187 188 189 190 | |
_shape_to_submaps()
Source code in toast/ops/pixels_wcs.py
395 396 397 398 399 400 401 402 403 404 405 406 407 | |
create_wcs(coord='EQU', proj='CAR', center_deg=None, bounds_deg=None, res_deg=None, dims=None)
classmethod
Create a WCS object given projection parameters.
Either the center_deg or bounds_deg parameters must be specified,
but not both.
When determining the pixel density in the projection, exactly two
parameters from the set of bounds_deg, res_deg and dims must be
specified.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
coord
|
str
|
The coordinate frame name. |
'EQU'
|
proj
|
str
|
The projection type. |
'CAR'
|
center_deg
|
tuple
|
The (lon, lat) projection center in degrees. |
None
|
bounds_deg
|
tuple
|
The (lon_min, lon_max, lat_min, lat_max) values in degrees. |
None
|
res_deg
|
tuple
|
The (lon, lat) resolution in degrees. |
None
|
dims
|
tuple
|
The (lon, lat) projection size in pixels. |
None
|
Returns:
| Type | Description |
|---|---|
(WCS, shape)
|
The instantiated WCS object and final shape. |
Source code in toast/ops/pixels_wcs.py
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | |
set_wcs()
Source code in toast/ops/pixels_wcs.py
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 | |
toast.ops.StokesWeights
Bases: Operator
Operator which generates I/Q/U pointing weights.
Given the individual detector pointing, this computes the pointing weights assuming that the detector is a linear polarizer followed by a total power measurement. By definition, the detector coordinate frame has the X-axis aligned with the polarization sensitive direction. An optional dictionary of pointing weight calibration factors may be specified for each observation.
If the hwp_angle field is specified, then an ideal HWP Mueller matrix is inserted in the optics chain before the linear polarizer. In this case, the fp_gamma key name must be specified and each detector must have a value in the focalplane table.
The timestream model without a HWP in COSMO convention is:
.. math:: d = cal \left[I + \frac{1 - \epsilon}{1 + \epsilon} \left[Q \cos\left(2\alpha\right) + U \sin\left(2\alpha\right) \right] \right]
When a HWP is present, we have:
.. math:: d = cal \left[I + \frac{1 - \epsilon}{1 + \epsilon} \left[Q \cos\left(2(\alpha - 2\omega) \right) - U \sin\left(2(\alpha - 2\omega) \right) \right] \right]
The detector orientation angle "alpha" in COSMO convention is measured in a right-handed sense from the local meridian and the HWP angle "omega" is also measured from the local meridian. The omega value can be described in terms of alpha, a fixed per-detector offset gamma, and the time varying HWP angle measured from the focalplane coordinate frame X-axis:
.. math:: \omega = \alpha + {\gamma}{HWP}(t) - {\gamma}{DET}
See documentation for a full treatment of this math.
By default, this operator uses the "COSMO" convention for Q/U. If the "IAU" trait is set to True, then resulting weights will differ by the sign of the U Stokes weight.
If the view trait is not specified, then this operator will use the same data view as the detector pointing operator when computing the pointing matrix pixels and weights.
Source code in toast/ops/stokes_weights/stokes_weights.py
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 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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
IAU = Bool(False, help='If True, use the IAU convention rather than COSMO')
class-attribute
instance-attribute
cal = Unicode(None, allow_none=True, help='The observation key with a dictionary of pointing weight calibration for each det')
class-attribute
instance-attribute
detector_pointing = Instance(klass=Operator, allow_none=True, help='Operator that translates boresight pointing into detector frame')
class-attribute
instance-attribute
fp_gamma = Unicode('gamma', allow_none=True, help='Focalplane key for detector gamma offset angle')
class-attribute
instance-attribute
hwp_angle = Unicode(None, allow_none=True, help='Observation shared key for HWP angle')
class-attribute
instance-attribute
mode = Unicode('I', help='The Stokes weights to generate (I, QU or IQU)')
class-attribute
instance-attribute
single_precision = Bool(False, help='If True, use 32bit float in output')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
weights = Unicode(defaults.weights, help='Observation detdata key for output weights')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/stokes_weights/stokes_weights.py
134 135 | |
_check_detector_pointing(proposal)
Source code in toast/ops/stokes_weights/stokes_weights.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | |
_check_mode(proposal)
Source code in toast/ops/stokes_weights/stokes_weights.py
127 128 129 130 131 132 | |
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/stokes_weights/stokes_weights.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | |
_finalize(data, **kwargs)
Source code in toast/ops/stokes_weights/stokes_weights.py
289 290 | |
_implementations()
Source code in toast/ops/stokes_weights/stokes_weights.py
310 311 312 313 314 315 316 | |
_provides()
Source code in toast/ops/stokes_weights/stokes_weights.py
305 306 307 308 | |
_requires()
Source code in toast/ops/stokes_weights/stokes_weights.py
292 293 294 295 296 297 298 299 300 301 302 303 | |
_supports_accel()
Source code in toast/ops/stokes_weights/stokes_weights.py
318 319 320 321 322 323 324 | |
Scan Strategy Characterization
toast.ops.CadenceMap
Bases: Operator
Tabulate which days each pixel on the map is visited.
Source code in toast/ops/cadence_map.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | |
det_flag_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
output_dir = Unicode('.', help='Write output data products to this directory')
class-attribute
instance-attribute
pixel_dist = Unicode(None, allow_none=True, help='The Data key containing the submap distribution')
class-attribute
instance-attribute
pixel_pointing = Instance(klass=Operator, allow_none=True, help='This must be an instance of a pixel pointing operator.')
class-attribute
instance-attribute
save_pointing = Bool(False, help='If True, do not clear pixel numbers after use')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_nonscience, help='Bit mask value for optional telescope flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/cadence_map.py
116 117 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/cadence_map.py
87 88 89 90 91 92 | |
_check_det_mask(proposal)
Source code in toast/ops/cadence_map.py
80 81 82 83 84 85 | |
_check_pixel_pointing(proposal)
Source code in toast/ops/cadence_map.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |
_check_shared_mask(proposal)
Source code in toast/ops/cadence_map.py
94 95 96 97 98 99 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/cadence_map.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | |
_finalize(data, **kwargs)
Source code in toast/ops/cadence_map.py
230 231 | |
_provides()
Source code in toast/ops/cadence_map.py
241 242 | |
_requires()
Source code in toast/ops/cadence_map.py
233 234 235 236 237 238 239 | |
toast.ops.CrossLinking
Bases: Operator
Evaluate an ACT-style crosslinking map
The result is a 3-component map that needs to be processed as crosslinking = SQRT(map[1]2 + map[2]2) / map[0] for the crosslinking statistic. This is not done in the operator to allow adding crosslinking maps together.
Source code in toast/ops/crosslinking.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
crosslinking_map = 'crosslinking_map'
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
noise_model = 'uniform_noise_weights'
class-attribute
instance-attribute
output_dir = Unicode('.', help='Write output data products to this directory')
class-attribute
instance-attribute
pixel_dist = Unicode('pixel_dist', help='The Data key where the PixelDist object should be stored')
class-attribute
instance-attribute
pixel_pointing = Instance(klass=Operator, allow_none=True, help='This must be an instance of a pixel pointing operator.')
class-attribute
instance-attribute
save_pointing = Bool(False, help='If True, do not clear pixel numbers after use')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_nonscience, help='Bit mask value for optional telescope flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
signal = 'dummy_signal'
class-attribute
instance-attribute
sync_type = Unicode('alltoallv', help="Communication algorithm: 'allreduce' or 'alltoallv'")
class-attribute
instance-attribute
weights = 'crosslinking_weights'
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/crosslinking.py
141 142 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/crosslinking.py
112 113 114 115 116 117 | |
_check_det_mask(proposal)
Source code in toast/ops/crosslinking.py
105 106 107 108 109 110 | |
_check_pixel_pointing(proposal)
Source code in toast/ops/crosslinking.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 | |
_check_shared_mask(proposal)
Source code in toast/ops/crosslinking.py
119 120 121 122 123 124 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/crosslinking.py
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | |
_finalize(data, **kwargs)
Source code in toast/ops/crosslinking.py
270 271 | |
_get_weights(obs_data, det)
Evaluate the special pointing matrix
Source code in toast/ops/crosslinking.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | |
_provides()
Source code in toast/ops/crosslinking.py
277 278 | |
_purge_weights(obs)
Discard special pointing matrix and dummy signal
Source code in toast/ops/crosslinking.py
190 191 192 193 194 | |
_requires()
Source code in toast/ops/crosslinking.py
273 274 275 | |
Noise Estimation
toast.ops.NoiseEstim
Bases: Operator
Noise estimation operator
Source code in toast/ops/noise_estimation.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key apply filtering to')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
detector_pointing = Instance(klass=Operator, allow_none=True, help='Operator that translates boresight pointing into detector frame. Only relevant if `maskfile` and/or `mapfile` are set')
class-attribute
instance-attribute
focalplane_key = Unicode(None, allow_none=True, help='When set, PSDs are measured over averaged TODs')
class-attribute
instance-attribute
lagmax = Int(10000, help='Maximum lag to consider for the covariance function. Will be truncated the length of the longest view.')
class-attribute
instance-attribute
mapfile = Unicode(None, allow_none=True, help='Optional HEALPix map to sample and subtract from the signal')
class-attribute
instance-attribute
mask_flag_mask = Int(defaults.det_mask_processing, help='Bit mask for raising processing mask flags')
class-attribute
instance-attribute
mask_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for processing mask flags')
class-attribute
instance-attribute
maskfile = Unicode(None, allow_none=True, help='Optional HEALPix processing mask')
class-attribute
instance-attribute
naverage = Int(100, help='Smoothing kernel width for downsampled data')
class-attribute
instance-attribute
nbin_psd = Int(1000, allow_none=True, help='Bin the resulting PSD')
class-attribute
instance-attribute
nocross = Bool(True, help='Do not evaluate cross-PSDs. Overridden by `pairs`')
class-attribute
instance-attribute
nosingle = Bool(False, help='Do not evaluate individual PSDs. Overridden by `pairs`')
class-attribute
instance-attribute
nsum = Int(1, help='Downsampling factor for decimated data')
class-attribute
instance-attribute
out_model = Unicode(None, allow_none=True, help='Create a new noise model with this name')
class-attribute
instance-attribute
output_dir = Unicode(None, allow_none=True, help='If specified, write output data products to this directory')
class-attribute
instance-attribute
pairs = List([], help='Detector pairs to estimate noise for. Overrides `nosingle` and `nocross`')
class-attribute
instance-attribute
pixel_dist = Unicode('pixel_dist', help='The Data key where the PixelDistribution object is located. Only relevant if `maskfile` and/or `mapfile` are set')
class-attribute
instance-attribute
pixel_pointing = Instance(klass=Operator, allow_none=True, help='An instance of a pixel pointing operator. Only relevant if `maskfile` and/or `mapfile` are set')
class-attribute
instance-attribute
pol = Bool(True, help='Sample also the polarized part of the map')
class-attribute
instance-attribute
remove_common_mode = Bool(False, help='Remove common mode signal before estimation')
class-attribute
instance-attribute
save_cov = Bool(False, help='Save also the sample covariance')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_nonscience, help='Bit mask value for optional shared flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
stationary_period = Quantity(86400 * u.s, help='Break the observation into several estimation periods of this length')
class-attribute
instance-attribute
stokes_weights = Instance(klass=Operator, allow_none=True, help='An instance of a Stokes weights operator. Only relevant if `mapfile` is set')
class-attribute
instance-attribute
symmetric = Bool(False, help='If True, treat positive and negative lags as equivalent in the cross correlator')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Only measure the covariance within each view')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/noise_estimation.py
236 237 238 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/noise_estimation.py
215 216 217 218 219 220 | |
_check_det_mask(proposal)
Source code in toast/ops/noise_estimation.py
208 209 210 211 212 213 | |
_check_detector_pointing(proposal)
Source code in toast/ops/noise_estimation.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | |
_check_nbin_psd(proposal)
Source code in toast/ops/noise_estimation.py
229 230 231 232 233 234 | |
_check_shared_mask(proposal)
Source code in toast/ops/noise_estimation.py
222 223 224 225 226 227 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/noise_estimation.py
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 | |
_finalize(data, **kwargs)
Source code in toast/ops/noise_estimation.py
1233 1234 | |
_provides()
Source code in toast/ops/noise_estimation.py
1253 1254 1255 1256 1257 1258 1259 1260 1261 | |
_re_redistribute(obs, temp_obs)
Source code in toast/ops/noise_estimation.py
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | |
_redistribute(obs)
Source code in toast/ops/noise_estimation.py
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | |
_requires()
Source code in toast/ops/noise_estimation.py
1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 | |
bin_psds(my_psds, fmin=None, fmax=None)
Source code in toast/ops/noise_estimation.py
577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 | |
decimate(signal, flags)
Downsample previously highpass-filtered signal
Source code in toast/ops/noise_estimation.py
550 551 552 553 | |
discard_outliers(binfreq, all_psds, all_times, all_cov)
Source code in toast/ops/noise_estimation.py
619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 | |
log_bin(freq, nbin=100, fmin=None, fmax=None)
Source code in toast/ops/noise_estimation.py
555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 | |
process_downsampled_noise_estimate(obs, global_intervals, timestamps, fsample, signal1, signal2, flags, my_psds1, my_cov1, lagmax)
Source code in toast/ops/noise_estimation.py
761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 | |
process_noise_estimate(obs, global_intervals, signal1, signal2, flags, timestamps, fsample, fileroot, det1, det2, lagmax)
Measure the sample (cross) covariance in the signal-subtracted TOD and Fourier-transform it for noise PSD.
Source code in toast/ops/noise_estimation.py
926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 | |
save_psds(binfreq, all_psds, all_times, det1, det2, fsample, rootname, all_cov)
Source code in toast/ops/noise_estimation.py
695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 | |
toast.ops.FitNoiseModel
Bases: Operator
Perform a least squares fit to an existing noise model.
This takes an existing estimated noise model and attempts to fit each spectrum to 1/f parameters.
If the output model is not specified, then the input is modified in place.
If the data has been filtered with a low-pass, then the high frequency spectral points are not representative of the actual white noise plateau. In this case, The min / max frequencies to consider can be specified.
Source code in toast/ops/noise_model.py
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
bad_fit_mask = Int(defaults.det_mask_processing, help='Bit mask to raise for bad fits')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
f_min = Quantity(1e-05 * u.Hz, help='Low-frequency rolloff of model in the fit')
class-attribute
instance-attribute
least_squares_ftol = Float(1e-10, allow_none=True, help='The ftol value passed to the least_squares solver')
class-attribute
instance-attribute
least_squares_gtol = Float(None, allow_none=True, help='The gtol value passed to the least_squares solver')
class-attribute
instance-attribute
least_squares_xtol = Float(None, allow_none=True, help='The xtol value passed to the least_squares solver')
class-attribute
instance-attribute
noise_model = Unicode('noise_model', help='The observation key containing the input noise model')
class-attribute
instance-attribute
out_model = Unicode(None, allow_none=True, help='Create a new noise model with this name')
class-attribute
instance-attribute
white_noise_max = Quantity(None, allow_none=True, help='The maximum frequency to consider for the white noise plateau')
class-attribute
instance-attribute
white_noise_min = Quantity(None, allow_none=True, help='The minimum frequency to consider for the white noise plateau')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/noise_model.py
241 242 | |
_check_det_mask(proposal)
Source code in toast/ops/noise_model.py
234 235 236 237 238 239 | |
_evaluate_log_model(freqs, fmin, net, fknee, alpha)
Evaluate the natural log of the noise model
Given the input frequencies, NET, slope alpha, f_min and f_knee, evaluate the ln(PSD) as:
ln(PSD) = 2 * ln(NET) + ln(f^alpha + f_knee^alpha) - ln(f^alpha + f_min^alpha)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
freqs
|
array
|
The input frequencies in Hz |
required |
fmin
|
float
|
The extreme low-frequency rolloff |
required |
fknee
|
float
|
The knee frequency |
required |
alpha
|
float
|
The slope parameter |
required |
Returns:
| Type | Description |
|---|---|
array
|
The log of the model PSD |
Source code in toast/ops/noise_model.py
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 | |
_evaluate_model(freqs, fmin, net, fknee, alpha)
Evaluate the noise model
Given the input frequencies, NET, slope alpha, f_min and f_knee, evaluate the PSD as:
PSD = NET^2 * [ (f^alpha + f_knee^alpha) / (f^alpha + f_min^alpha) ]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
freqs
|
array
|
The input frequencies in Hz |
required |
fmin
|
float
|
The extreme low-frequency rolloff |
required |
fknee
|
float
|
The knee frequency |
required |
alpha
|
float
|
The slope parameter |
required |
Returns:
| Type | Description |
|---|---|
array
|
The model PSD |
Source code in toast/ops/noise_model.py
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/noise_model.py
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | |
_finalize(data, **kwargs)
Source code in toast/ops/noise_model.py
585 586 | |
_fit_log_fun(x, *args, **kwargs)
Evaluate the weighted residual in log space.
For the given set of parameters, this evaluates the model log PSD and computes the residual from the real data. This residual is further weighted so that the better constrained high-frequency values have more significance. We arbitrarily choose a weighting of:
W = f_nyquist - (f_nyquist / (1 + f^2))
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
array
|
The current model parameters |
required |
kwargs
|
The fixed information is passed in through the least squares solver. |
{}
|
Returns:
| Type | Description |
|---|---|
array
|
The array of residuals |
Source code in toast/ops/noise_model.py
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | |
_fit_log_jac(x, *args, **kwargs)
Evaluate the partial derivatives of model.
This returns the Jacobian containing the partial derivatives of the log-space model with respect to the fit parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
array
|
The current model parameters |
required |
kwargs
|
The fixed information is passed in through the least squares solver. |
{}
|
Returns:
| Type | Description |
|---|---|
array
|
The Jacobian |
Source code in toast/ops/noise_model.py
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 | |
_fit_log_psd(freqs, data, guess=None)
Perform a log-space fit to model PSD parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
freqs
|
Quantity
|
The frequency values |
required |
data
|
Quantity
|
The estimated input PSD |
required |
guess
|
array
|
Optional starting point guess |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
Dictionary of fit parameters |
Source code in toast/ops/noise_model.py
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 | |
_get_err_ret(psd_unit)
Source code in toast/ops/noise_model.py
452 453 454 455 456 457 458 459 460 461 462 | |
_provides()
Source code in toast/ops/noise_model.py
591 592 593 | |
_requires()
Source code in toast/ops/noise_model.py
588 589 | |
toast.ops.FlagNoiseFit
Bases: Operator
Operator which flags detectors that have outlier noise properties.
Source code in toast/ops/noise_model.py
596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key for timestreams (only if RMS cut enabled)')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for detector sample flagging (only if RMS cut used)')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
focalplane_key = Unicode(None, allow_none=True, help='Process detectors in groups based on this column')
class-attribute
instance-attribute
focalplane_value = Unicode(None, allow_none=True, help='Only consider detectors with this focalplane value')
class-attribute
instance-attribute
low_noise_limit = Float(0.1, allow_none=False, help='Fraction of median NET or RMS to cut anomalously low detectors at')
class-attribute
instance-attribute
noise_model = Unicode('noise_model', help='The observation key containing the noise model')
class-attribute
instance-attribute
outlier_flag_mask = Int(defaults.det_mask_processing, help='Bit mask to raise flags with')
class-attribute
instance-attribute
sigma_NET = Float(5.0, help='Flag detectors with NET values outside this range')
class-attribute
instance-attribute
sigma_fknee = Float(None, allow_none=True, help='Flag detectors with knee frequency values outside this range')
class-attribute
instance-attribute
sigma_rms = Float(None, allow_none=True, help='In addition to flagging based on estimated model, also apply overall TOD cut')
class-attribute
instance-attribute
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/noise_model.py
661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 | |
_finalize(data, **kwargs)
Source code in toast/ops/noise_model.py
889 890 | |
_provides()
Source code in toast/ops/noise_model.py
903 904 905 906 907 908 909 | |
_requires()
Source code in toast/ops/noise_model.py
892 893 894 895 896 897 898 899 900 901 | |
toast.ops.SignalDiffNoiseModel
Bases: Operator
Evaluate a simple white noise model based on consecutive sample differences.
Source code in toast/ops/signal_diff_noise_model.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
alpha = Float(1.0, help='Slope of the 1/f noise model')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key to analyze')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
fknee = Quantity(1e-06 * u.Hz, help='Knee frequency to use for noise model.')
class-attribute
instance-attribute
fmin = Quantity(1e-06 * u.Hz, help='Minimum frequency to use for noise model.')
class-attribute
instance-attribute
net_factors = []
instance-attribute
noise_model = Unicode('noise_model', help='The observation key containing the output noise model')
class-attribute
instance-attribute
rates = []
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_nonscience, help='Bit mask value for optional shared flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
total_factors = []
instance-attribute
view = Unicode(None, allow_none=True, help='Evaluate the sample differences in this view')
class-attribute
instance-attribute
weights_in = []
instance-attribute
weights_out = []
instance-attribute
__init__(**kwargs)
Source code in toast/ops/signal_diff_noise_model.py
99 100 101 102 103 104 105 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/signal_diff_noise_model.py
92 93 94 95 96 97 | |
_check_det_mask(proposal)
Source code in toast/ops/signal_diff_noise_model.py
78 79 80 81 82 83 | |
_check_shared_flag_mask(proposal)
Source code in toast/ops/signal_diff_noise_model.py
85 86 87 88 89 90 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/signal_diff_noise_model.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | |
_finalize(data, **kwargs)
Source code in toast/ops/signal_diff_noise_model.py
170 171 | |
_provides()
Source code in toast/ops/signal_diff_noise_model.py
188 189 190 191 192 193 194 195 | |
_requires()
Source code in toast/ops/signal_diff_noise_model.py
173 174 175 176 177 178 179 180 181 182 183 184 185 186 | |
Map Making
Utilities
toast.ops.BuildPixelDistribution
Bases: Operator
Operator which builds the pixel distribution information.
This operator runs the pointing operator and builds the PixelDist instance describing how submaps are distributed among processes. This requires expanding the full detector pointing once in order to compute the distribution. This is done one detector at a time unless the save_pointing trait is set to True.
NOTE: The pointing operator must have the "pixels" and "create_dist" traits, which will be set by this operator during execution.
Output PixelDistribution objects are stored in the Data dictionary.
Source code in toast/ops/pointing.py
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 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 128 129 130 131 132 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
pixel_dist = Unicode('pixel_dist', help='The Data key where the PixelDist object should be stored')
class-attribute
instance-attribute
pixel_pointing = Instance(klass=Operator, allow_none=True, help='This must be an instance of a pointing operator')
class-attribute
instance-attribute
save_pointing = Bool(False, help='If True, do not clear detector pointing matrices after use')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/pointing.py
67 68 | |
_check_pixel_pointing(proposal)
Source code in toast/ops/pointing.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/pointing.py
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 | |
_finalize(data, **kwargs)
Source code in toast/ops/pointing.py
117 118 | |
_provides()
Source code in toast/ops/pointing.py
124 125 126 127 128 129 130 131 132 | |
_requires()
Source code in toast/ops/pointing.py
120 121 122 | |
toast.ops.BuildHitMap
Bases: Operator
Operator which builds a hitmap.
Given the pointing matrix for each detector, accumulate the hit map. The PixelData object containing the hit map is returned by the finalize() method.
If any samples have compromised telescope pointing, those pixel indices should have already been set to a negative value by the operator that generated the pointing matrix.
Although individual detector flags do not impact the pointing per se, they can be used with this operator in order to produce a hit map that is consistent with other pixel space products. The detector mask defaults to cutting "non-science" samples.
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
hits = Unicode('hits', help='The Data key for the output hit map')
class-attribute
instance-attribute
pixel_dist = Unicode(None, allow_none=True, help='The Data key containing the submap distribution')
class-attribute
instance-attribute
pixels = Unicode(defaults.pixels, help='Observation detdata key for pixel indices')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_nonscience, help='Bit mask value for optional flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
sync_type = Unicode('alltoallv', help="Communication algorithm: 'allreduce' or 'alltoallv'")
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
110 111 | |
_check_det_mask(proposal)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
89 90 91 92 93 94 | |
_check_flag_mask(proposal)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
96 97 98 99 100 101 | |
_check_sync_type(proposal)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
103 104 105 106 107 108 | |
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | |
_finalize(data, **kwargs)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
207 208 209 210 211 212 213 214 | |
_implementations()
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
235 236 237 238 239 240 241 | |
_provides()
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
231 232 233 | |
_requires()
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
216 217 218 219 220 221 222 223 224 225 226 227 228 229 | |
_supports_accel()
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
243 244 245 | |
toast.ops.BuildInverseCovariance
Bases: Operator
Operator which builds a pixel-space diagonal inverse noise covariance.
Given the pointing matrix and noise model for each detector, accumulate the inverse noise covariance:
.. math:: N_pp'^{-1} = \left( P^T N_tt'^{-1} P \right)
The PixelData object containing this is returned by the finalize() method.
If any samples have compromised telescope pointing, those pixel indices should have already been set to a negative value by the operator that generated the pointing matrix. Individual detector flags can optionally be applied to timesamples when accumulating data. The detector mask defaults to cutting "non-science" samples.
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Desired timestream units')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
inverse_covariance = Unicode('inv_covariance', help='The Data key for the output inverse covariance')
class-attribute
instance-attribute
noise_model = Unicode('noise_model', help='Observation key containing the noise model')
class-attribute
instance-attribute
pixel_dist = Unicode(None, allow_none=True, help='The Data key containing the submap distribution')
class-attribute
instance-attribute
pixels = Unicode('pixels', help='Observation detdata key for pixel indices')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_nonscience, help='Bit mask value for optional flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
sync_type = Unicode('alltoallv', help="Communication algorithm: 'allreduce' or 'alltoallv'")
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
weights = Unicode('weights', help='Observation detdata key for Stokes weights')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
348 349 | |
_check_det_mask(proposal)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
327 328 329 330 331 332 | |
_check_flag_mask(proposal)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
334 335 336 337 338 339 | |
_check_sync_type(proposal)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
341 342 343 344 345 346 | |
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 | |
_finalize(data, **kwargs)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
516 517 518 519 520 521 522 523 | |
_implementations()
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
545 546 547 548 549 550 551 | |
_provides()
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
541 542 543 | |
_requires()
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 | |
_supports_accel()
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
553 554 555 | |
toast.ops.BuildNoiseWeighted
Bases: Operator
Operator which builds a noise-weighted map.
Given the pointing matrix and noise model for each detector, accumulate the noise weighted map:
.. math:: Z_p = P^T N_tt'^{-1} d
Which is the timestream data waited by the diagonal time domain noise covariance and projected into pixel space. The PixelData object containing this is returned by the finalize() method.
If any samples have compromised telescope pointing, those pixel indices should have already been set to a negative value by the operator that generated the pointing matrix. Individual detector flags can optionally be applied to timesamples when accumulating data. The detector mask defaults to cutting "non-science" samples.
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, allow_none=True, help='Observation detdata key for the timestream data')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Desired timestream units')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
noise_model = Unicode('noise_model', help='Observation key containing the noise model')
class-attribute
instance-attribute
pixel_dist = Unicode(None, allow_none=True, help='The Data key containing the submap distribution')
class-attribute
instance-attribute
pixels = Unicode('pixels', help='Observation detdata key for pixel indices')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_nonscience, help='Bit mask value for optional flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
sync_type = Unicode('alltoallv', help="Communication algorithm: 'allreduce' or 'alltoallv'")
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
weights = Unicode('weights', help='Observation detdata key for Stokes weights')
class-attribute
instance-attribute
zmap = Unicode('zmap', help='The Data key for the output noise weighted map')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
664 665 | |
_check_det_mask(proposal)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
643 644 645 646 647 648 | |
_check_flag_mask(proposal)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
650 651 652 653 654 655 | |
_check_sync_type(proposal)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
657 658 659 660 661 662 | |
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 | |
_finalize(data, use_accel=None, **kwargs)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 | |
_implementations()
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
951 952 953 954 955 956 957 | |
_provides()
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
945 946 947 948 949 | |
_requires()
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 | |
_supports_accel()
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
959 960 | |
toast.ops.CovarianceAndHits
Bases: Operator
Operator which builds the pixel-space diagonal noise covariance and hit map.
Frequently the first step in map making is to determine what pixels on the sky have been covered and build the diagonal noise covariance. During the construction of the covariance we can cut pixels that are poorly conditioned.
This operator runs the pointing operator and builds the PixelDist instance describing how submaps are distributed among processes. It builds the hit map and the inverse covariance and then inverts this with a threshold on the condition number in each pixel. The detector flag mask defaults to cutting "non-science" samples.
NOTE: The pixel pointing operator must have the "pixels", "create_dist" traits, which will be set by this operator during execution.
Output PixelData objects are stored in the Data dictionary.
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
covariance = Unicode('covariance', help='The Data key where the covariance should be stored')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Desired timestream units')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
hits = Unicode('hits', help='The Data key where the hit map should be stored')
class-attribute
instance-attribute
inverse_covariance = Unicode(None, allow_none=True, help='The Data key where the inverse covariance should be stored')
class-attribute
instance-attribute
noise_model = Unicode('noise_model', help='Observation key containing the noise model')
class-attribute
instance-attribute
pixel_dist = Unicode('pixel_dist', help='The Data key where the PixelDist object should be stored')
class-attribute
instance-attribute
pixel_pointing = Instance(klass=Operator, allow_none=True, help='This must be an instance of a pointing operator')
class-attribute
instance-attribute
rcond = Unicode('rcond', help='The Data key where the reciprocal condition number should be stored')
class-attribute
instance-attribute
rcond_threshold = Float(1e-08, help='Minimum value for inverse condition number cut.')
class-attribute
instance-attribute
save_pointing = Bool(False, help='If True, do not clear detector pointing matrices after use')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_nonscience, help='Bit mask value for optional flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
stokes_weights = Instance(klass=Operator, allow_none=True, help='This must be an instance of a Stokes weights operator')
class-attribute
instance-attribute
sync_type = Unicode('alltoallv', help="Communication algorithm: 'allreduce' or 'alltoallv'")
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
1129 1130 | |
_check_det_mask(proposal)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
1071 1072 1073 1074 1075 1076 | |
_check_flag_mask(proposal)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
1078 1079 1080 1081 1082 1083 | |
_check_pixel_pointing(proposal)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 | |
_check_shared_mask(proposal)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
1085 1086 1087 1088 1089 1090 | |
_check_stokes_weights(proposal)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 | |
_check_sync_type(proposal)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
1092 1093 1094 1095 1096 1097 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 | |
_finalize(data, **kwargs)
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
1275 1276 | |
_provides()
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 | |
_requires()
Source code in toast/ops/mapmaker_utils/mapmaker_utils.py
1278 1279 1280 1281 1282 1283 1284 1285 1286 | |
toast.ops.NoiseWeight
Bases: Operator
Apply diagonal noise weighting to detector data.
This simple operator takes the detector weight from the specified noise model and applies it to the timestream values. We ignore all detector flags in this operator, since there is no harm in multiplying the noise weight by values in invalid samples.
Source code in toast/ops/noise_weight/noise_weight.py
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 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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data = Unicode(None, allow_none=True, help='Observation detdata key for the timestream data')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
noise_model = Unicode('noise_model', help='The observation key containing the noise model')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/noise_weight/noise_weight.py
72 73 | |
_check_det_mask(proposal)
Source code in toast/ops/noise_weight/noise_weight.py
58 59 60 61 62 63 | |
_check_flag_mask(proposal)
Source code in toast/ops/noise_weight/noise_weight.py
65 66 67 68 69 70 | |
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/noise_weight/noise_weight.py
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 128 129 130 131 132 133 134 135 136 | |
_finalize(data, **kwargs)
Source code in toast/ops/noise_weight/noise_weight.py
138 139 | |
_implementations()
Source code in toast/ops/noise_weight/noise_weight.py
154 155 156 157 158 159 160 | |
_provides()
Source code in toast/ops/noise_weight/noise_weight.py
151 152 | |
_requires()
Source code in toast/ops/noise_weight/noise_weight.py
141 142 143 144 145 146 147 148 149 | |
_supports_accel()
Source code in toast/ops/noise_weight/noise_weight.py
162 163 | |
toast.ops.BinMap
Bases: Operator
Operator which bins a map.
Given a noise model and a pointing operator, build the noise weighted map and apply the noise covariance to get resulting binned map.
Source code in toast/ops/mapmaker_binning.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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
binned = Unicode('binned', help='The Data key where the binned map should be stored')
class-attribute
instance-attribute
covariance = Unicode('covariance', help='The Data key containing the noise covariance PixelData instance')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key for the timestream data')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Desired timestream units')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
full_pointing = Bool(False, help='If True, expand pointing for all detectors and save')
class-attribute
instance-attribute
noise_model = Unicode(defaults.noise_model, help='Observation key containing the noise model')
class-attribute
instance-attribute
noiseweighted = Unicode(None, allow_none=True, help='The Data key where the noiseweighted map should be stored')
class-attribute
instance-attribute
pixel_dist = Unicode('pixel_dist', help='The Data key where the PixelDist object should be stored')
class-attribute
instance-attribute
pixel_pointing = Instance(klass=Operator, allow_none=True, help='This must be an instance of a pixel pointing operator')
class-attribute
instance-attribute
pre_process = Instance(klass=Operator, allow_none=True, help='Optional extra operator to run prior to binning')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_nonscience, help='Bit mask value for optional telescope flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
stokes_weights = Instance(klass=Operator, allow_none=True, help='This must be an instance of a Stokes weights operator')
class-attribute
instance-attribute
sync_type = Unicode('alltoallv', help="Communication algorithm: 'allreduce' or 'alltoallv'")
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/mapmaker_binning.py
175 176 | |
_check_det_mask(proposal)
Source code in toast/ops/mapmaker_binning.py
117 118 119 120 121 122 | |
_check_flag_mask(proposal)
Source code in toast/ops/mapmaker_binning.py
124 125 126 127 128 129 | |
_check_pixel_pointing(proposal)
Source code in toast/ops/mapmaker_binning.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 | |
_check_shared_mask(proposal)
Source code in toast/ops/mapmaker_binning.py
131 132 133 134 135 136 | |
_check_stokes_weights(proposal)
Source code in toast/ops/mapmaker_binning.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
_check_sync_type(proposal)
Source code in toast/ops/mapmaker_binning.py
138 139 140 141 142 143 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/mapmaker_binning.py
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | |
_finalize(data, **kwargs)
Source code in toast/ops/mapmaker_binning.py
296 297 | |
_provides()
Source code in toast/ops/mapmaker_binning.py
315 316 317 | |
_requires()
Source code in toast/ops/mapmaker_binning.py
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 | |
Observation Matrices
toast.ops.ObsMat
Bases: object
Observation Matrix class
Source code in toast/ops/obsmat.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 | |
data
property
filename = filename
instance-attribute
matrix = None
instance-attribute
__iadd__(other)
Source code in toast/ops/obsmat.py
66 67 68 69 70 71 | |
__imul__(other)
Source code in toast/ops/obsmat.py
73 74 75 76 77 78 | |
__init__(filename=None)
Source code in toast/ops/obsmat.py
23 24 25 26 27 | |
apply(map_in)
Source code in toast/ops/obsmat.py
46 47 48 49 50 51 52 53 54 55 56 57 | |
load(filename=None)
Source code in toast/ops/obsmat.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
sort_indices()
Source code in toast/ops/obsmat.py
59 60 | |
toast.ops.FilterBin
Bases: Operator
FilterBin builds a template matrix and projects out compromised modes. It then bins the signal and optionally writes out the sparse observation matrix that matches the filtering operations. FilterBin supports deprojection templates.
THIS OPERATOR ASSUMES OBSERVATIONS ARE DISTRIBUTED BY DETECTOR WITHIN A GROUP
Source code in toast/ops/filterbin.py
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
azimuth = Unicode(defaults.azimuth, allow_none=True, help='Observation shared key for Azimuth')
class-attribute
instance-attribute
binning = Instance(klass=Operator, allow_none=True, help='Binning operator for map making.')
class-attribute
instance-attribute
cache_dir = Unicode(None, allow_none=True, help='Cache directory for additive observation matrix products')
class-attribute
instance-attribute
deproject_map = Unicode(None, allow_none=True, help='Healpix map containing the deprojection templates: intensity map and its derivatives')
class-attribute
instance-attribute
deproject_map_name = 'deprojection_map'
class-attribute
instance-attribute
deproject_nnz = Int(1, help='Number of deprojection templates to regress. Must be less than or equal to number of columns in `deproject_map`.')
class-attribute
instance-attribute
deproject_pattern = Unicode('.*', help='Regular expression to test detector names with. Only matching detectors will be deprojected. Used to identify differenced TOD.')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key for the timestream data')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
filter_flag_mask = Int(defaults.shared_mask_invalid, help='Bit mask value for flagging samples that fail filtering')
class-attribute
instance-attribute
ground_filter_bin_width = Quantity(None, allow_none=True, help='Azimuthal bin width of ground filter')
class-attribute
instance-attribute
ground_filter_order = Int(None, allow_none=True, help='Order of a Legendre polynomial to fit as a function of azimuth.')
class-attribute
instance-attribute
hwp_angle = Unicode(defaults.hwp_angle, allow_none=True, help='Observation shared key for HWP angle')
class-attribute
instance-attribute
hwp_filter_order = Int(None, allow_none=True, help='Order of HWP-synchronous signal filter.')
class-attribute
instance-attribute
keep_final_products = Bool(False, help='If True, keep the map domain products in data after write')
class-attribute
instance-attribute
leftright_interval = Unicode(defaults.throw_leftright_interval, help='Intervals for left-to-right scans')
class-attribute
instance-attribute
maskfile = Unicode(None, allow_none=True, help='Optional processing mask')
class-attribute
instance-attribute
mc_index = Int(None, allow_none=True, help='The Monte-Carlo index')
class-attribute
instance-attribute
mc_mode = Bool(False, help='If True, re-use solver flags, sparse covariances, etc')
class-attribute
instance-attribute
noiseweight_obs_matrix = Bool(False, help='If True, observation matrix should match noise-weighted maps')
class-attribute
instance-attribute
output_dir = Unicode('.', help='Write output data products to this directory')
class-attribute
instance-attribute
poly_filter_order = Int(1, allow_none=True, help='Polynomial order')
class-attribute
instance-attribute
poly_filter_view = Unicode('throw', allow_none=True, help='Intervals for polynomial filtering')
class-attribute
instance-attribute
rcond_threshold = Float(0.001, help='Minimum value for inverse pixel condition number cut.')
class-attribute
instance-attribute
report_memory = Bool(False, help='Report memory throughout the execution')
class-attribute
instance-attribute
reset_pix_dist = Bool(False, help='Clear any existing pixel distribution. Useful when applyingrepeatedly to different data objects.')
class-attribute
instance-attribute
rightleft_interval = Unicode(defaults.throw_rightleft_interval, help='Intervals for right-to-left scans')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_nonscience, help='Bit mask value for optional telescope flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
split_ground_template = Bool(False, help='Apply a different template for left and right scans')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
write_binmap = Bool(False, help='If True, write the unfiltered map')
class-attribute
instance-attribute
write_cov = Bool(True, help='If True, write the white noise covariance matrices.')
class-attribute
instance-attribute
write_hdf5 = Bool(False, help='If True, output maps are in HDF5 rather than FITS format.')
class-attribute
instance-attribute
write_hdf5_serial = Bool(False, help='If True, force serial HDF5 write of output maps.')
class-attribute
instance-attribute
write_hits = Bool(True, help='If True, write the hits map')
class-attribute
instance-attribute
write_invcov = Bool(False, help='If True, write the inverse white noise covariance matrices.')
class-attribute
instance-attribute
write_map = Bool(True, help='If True, write the filtered map')
class-attribute
instance-attribute
write_noiseweighted_binmap = Bool(False, help='If True, write the noise-weighted unfiltered map')
class-attribute
instance-attribute
write_noiseweighted_map = Bool(False, help='If True, write the noise-weighted filtered map')
class-attribute
instance-attribute
write_obs_matrix = Bool(False, help='Write the observation matrix')
class-attribute
instance-attribute
write_rcond = Bool(True, help='If True, write the reciprocal condition numbers.')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/filterbin.py
460 461 | |
_accumulate_observation_matrix(obs, det, pixels, weights, good_fit, good_bin, det_templates, template_covariance)
Calculate P^T N^-1 Z P This part of the covariance calculation is cumulative: each observation and detector is computed independently and can be cached.
Observe that N in this equation need not be the same used in
template covariance in Z.
Source code in toast/ops/filterbin.py
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 | |
_add_deprojection_templates(data, obs, pixels, templates)
Source code in toast/ops/filterbin.py
975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 | |
_add_ground_bin_templates(obs, templates)
Source code in toast/ops/filterbin.py
858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 | |
_add_ground_poly_templates(obs, templates)
Source code in toast/ops/filterbin.py
815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 | |
_add_hwp_templates(obs, templates)
Source code in toast/ops/filterbin.py
790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 | |
_add_matrix(local_obs_matrix, detweight)
Add the local (per detector) observation matrix to the full matrix
Source code in toast/ops/filterbin.py
1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 | |
_add_poly_templates(obs, templates)
Source code in toast/ops/filterbin.py
929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 | |
_bin_map(data, detectors, filtered, extra_header=None)
Bin the signal onto a map. Optionally write out hits and white noise covariance matrices.
Source code in toast/ops/filterbin.py
1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 | |
_build_common_templates(obs)
Source code in toast/ops/filterbin.py
964 965 966 967 968 969 970 971 972 973 | |
_build_template_covariance(templates, good)
Calculate (F^T N^-1_F F)^-1
Observe that the sample noise weights in N^-1_F need not be the same as in binning the filtered signal. For instance, samples falling on point sources may be masked here but included in the final map.
Source code in toast/ops/filterbin.py
1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 | |
_check_binning(proposal)
Source code in toast/ops/filterbin.py
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/filterbin.py
419 420 421 422 423 424 | |
_check_det_mask(proposal)
Source code in toast/ops/filterbin.py
412 413 414 415 416 417 | |
_check_shared_mask(proposal)
Source code in toast/ops/filterbin.py
426 427 428 429 430 431 | |
_collect_obs_matrix()
Source code in toast/ops/filterbin.py
1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 | |
_compress_pixels(pixels)
Source code in toast/ops/filterbin.py
1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 | |
_deweight_obs_matrix(data)
Apply (P^T N^-1 P)^-1 to the cumulative part of the observation matrix, P^T N^-1 Z P.
Source code in toast/ops/filterbin.py
1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/filterbin.py
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 | |
_expand_matrix(compressed_matrix, local_to_global)
Expands a dense, compressed matrix into a sparse matrix with global indexing
Source code in toast/ops/filterbin.py
1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 | |
_finalize(data, **kwargs)
Source code in toast/ops/filterbin.py
1656 1657 | |
_get_extra_header(data, detectors)
Extract useful information from the data object to record in map headers
Source code in toast/ops/filterbin.py
1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 | |
_get_phase(obs)
Source code in toast/ops/filterbin.py
1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 | |
_initialize_comm(data)
Create convenience aliases to the communicators and properties.
Source code in toast/ops/filterbin.py
1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 | |
_initialize_obs_matrix()
Source code in toast/ops/filterbin.py
1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 | |
_load_deprojection_map(data)
Source code in toast/ops/filterbin.py
1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 | |
_provides()
Source code in toast/ops/filterbin.py
1665 1666 1667 1668 | |
_regress_templates(templates, template_covariance, signal, good)
Calculate Zd = (I - F(F^T N^-1_F F)^-1 F^T N^-1_F)d
All samples that are not flagged (zero weight in N^-1_F) have equal weight.
Source code in toast/ops/filterbin.py
1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 | |
_requires()
Source code in toast/ops/filterbin.py
1659 1660 1661 1662 1663 | |
toast.ops.combine_observation_matrix(rootname)
Combine slices of the observation matrix into a single scipy sparse matrix file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rootname (str)
|
rootname of the matrix slices. Typically
|
required |
Returns:
filename_matrix (str) : Name of the composed matrix file,
{rootname}.npz.
Source code in toast/ops/filterbin.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | |
toast.ops.coadd_observation_matrix(inmatrix, outmatrix, file_invcov=None, file_cov=None, nside_submap=16, rcond_limit=0.001, double_precision=False, comm=None)
Co-add noise-weighted observation matrices
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inmatrix(iterable)
|
One or more noise-weighted observation
matrix files. If a matrix is used to model several similar
observations, append |
required | |
outmatrix(string)
|
Name of output file. If it includes the string 'noiseweighted', the output matrix will be noise-weighted like the inputs. |
required | |
file_invcov(string)
|
Name of output inverse covariance file |
required | |
file_cov(string)
|
Name of output covariance file |
required | |
nside_submap(int)
|
Submap size is 12 * nside_submap ** 2. Number of submaps is (nside / nside_submap) ** 2 |
required | |
rcond_limit(float)
|
"Reciprocal condition number limit |
required | |
double_precision(bool)
|
Output in double precision |
required |
Source code in toast/ops/obsmat.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | |
Template Regression
toast.templates.Amplitudes
Bases: AcceleratorObject
Class for distributed template amplitudes.
In the general case, template amplitudes exist as sparse, non-unique values across all processes. This object provides methods for describing the local distribution of amplitudes and for doing global reductions and dot products.
There are 4 supported cases:
1. If n_global == n_local, then every process has a full copy of the amplitude
values.
2. If n_global != n_local and both local_indices and local_ranges are None,
then every process has a disjoint set of amplitudes. The sum of n_local
across all processes must equal n_global.
3. If n_global != n_local and local_ranges is not None, then local_ranges
specifies the contiguous global slices that are concatenated to form the
local data. The sum of the lengths of the slices must equal n_local.
4. If n_global != n_local and local_indices is not None, then local_indices
is an array of the global indices of all the local data. The length of
local_indices must equal n_local. WARNING: this case is more costly in
terms of storage and reduction. Avoid it if possible.
Because different process groups have different sets of observations, there are some types of templates which may only have shared amplitudes within the group communicator. If use_group is True, the group communicator is used instead of the world communicator, and n_global is interpreted as the number of amplitudes in the group. This information is needed whenever working with the full set of amplitudes (for example when doing I/O).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
comm
|
Comm
|
The toast communicator. |
required |
n_global
|
int
|
The number of global values across all processes. |
required |
n_local
|
int
|
The number of values on this process. |
required |
local_indices
|
array
|
If not None, the explicit indices of the local amplitudes within the global array. |
None
|
local_ranges
|
list
|
If not None, a list of tuples with the (offset, n_amp) amplitude ranges stored locally. |
None
|
dtype
|
dtype
|
The amplitude dtype. |
float64
|
use_group
|
bool
|
If True, use the group rather than world communicator. |
False
|
Source code in toast/templates/amplitudes.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 | |
_comm = comm
instance-attribute
_dtype = np.dtype(dtype)
instance-attribute
_full = False
instance-attribute
_global_first = None
instance-attribute
_global_last = None
instance-attribute
_local_indices = local_indices
instance-attribute
_local_ranges = local_ranges
instance-attribute
_mpicomm = self._comm.comm_group
instance-attribute
_n_global = n_global
instance-attribute
_n_local = n_local
instance-attribute
_raw = None
instance-attribute
_raw_flags = None
instance-attribute
_use_group = use_group
instance-attribute
comm
property
The toast communicator in use.
local = None
instance-attribute
local_flags = None
instance-attribute
local_indices
property
The global indices of the local amplitudes, or None.
local_ranges
property
The global slices covered by local amplitudes, or None.
n_global
property
The total number of amplitudes.
n_local
property
The number of locally stored amplitudes.
n_local_flagged
property
The number of local amplitudes that are flagged.
use_group
property
Whether to use the group communicator rather than the global one.
__add__(other)
Source code in toast/templates/amplitudes.py
268 269 270 271 | |
__del__()
Source code in toast/templates/amplitudes.py
205 206 | |
__eq__(value)
Source code in toast/templates/amplitudes.py
214 215 216 217 218 | |
__iadd__(other)
Source code in toast/templates/amplitudes.py
224 225 226 227 228 229 230 231 232 233 | |
__imul__(other)
Source code in toast/templates/amplitudes.py
246 247 248 249 250 251 252 253 254 255 | |
__init__(comm, n_global, n_local, local_indices=None, local_ranges=None, dtype=np.float64, use_group=False)
Source code in toast/templates/amplitudes.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | |
__isub__(other)
Source code in toast/templates/amplitudes.py
235 236 237 238 239 240 241 242 243 244 | |
__itruediv__(other)
Source code in toast/templates/amplitudes.py
257 258 259 260 261 262 263 264 265 266 | |
__mul__(other)
Source code in toast/templates/amplitudes.py
278 279 280 281 | |
__repr__()
Source code in toast/templates/amplitudes.py
208 209 210 211 212 | |
__sub__(other)
Source code in toast/templates/amplitudes.py
273 274 275 276 | |
__truediv__(other)
Source code in toast/templates/amplitudes.py
283 284 285 286 | |
_accel_create(zero_out=False)
Source code in toast/templates/amplitudes.py
740 741 742 743 744 745 746 747 748 749 750 | |
_accel_delete()
Source code in toast/templates/amplitudes.py
772 773 774 775 776 777 778 779 780 | |
_accel_exists()
Source code in toast/templates/amplitudes.py
726 727 728 729 730 731 732 733 734 735 736 737 738 | |
_accel_reset()
Source code in toast/templates/amplitudes.py
802 803 804 | |
_accel_reset_local()
Source code in toast/templates/amplitudes.py
782 783 784 785 786 787 788 789 790 | |
_accel_reset_local_flags()
Source code in toast/templates/amplitudes.py
792 793 794 795 796 797 798 799 800 | |
_accel_update_device()
Source code in toast/templates/amplitudes.py
752 753 754 755 756 757 758 759 760 | |
_accel_update_host()
Source code in toast/templates/amplitudes.py
762 763 764 765 766 767 768 769 770 | |
clear()
Delete the underlying memory.
This will forcibly delete the C-allocated memory and invalidate all python references to this object. DO NOT CALL THIS unless you are sure all references are no longer being used and you are about to delete the object.
Source code in toast/templates/amplitudes.py
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | |
dot(other, comm_bytes=10000000)
Perform a dot product with another Amplitudes object.
The other instance must have the same data distribution. The two objects are assumed to have already been synchronized, so that any amplitudes that exist on multiple processes have the same values. This further assumes that any flagged amplitudes have been set to zero.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other
|
Amplitudes
|
The other instance. |
required |
comm_bytes
|
int
|
The maximum number of bytes to communicate in each call to Allreduce. Only used in the case of explicitly indexed amplitudes on each process. |
10000000
|
Result
(float): The dot product.
Source code in toast/templates/amplitudes.py
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 | |
duplicate()
Return a copy of the data.
Source code in toast/templates/amplitudes.py
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | |
reset()
Set all amplitude values to zero.
Source code in toast/templates/amplitudes.py
288 289 290 291 292 293 294 | |
reset_flags()
Set all flag values to zero.
Source code in toast/templates/amplitudes.py
296 297 298 299 300 301 302 | |
sync(comm_bytes=10000000)
Perform an Allreduce across all processes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
comm_bytes
|
int
|
The maximum number of bytes to communicate in each call to Allreduce. |
10000000
|
Returns:
| Type | Description |
|---|---|
|
None |
Source code in toast/templates/amplitudes.py
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 | |
toast.templates.AmplitudesMap
Bases: MutableMapping, AcceleratorObject
Helper class to provide arithmetic operations on a collection of Amplitudes.
This simply provides syntactic sugar to reduce duplicated code when working with a collection of Amplitudes in the map making.
Source code in toast/templates/amplitudes.py
807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 | |
_internal = dict()
instance-attribute
__add__(other)
Source code in toast/templates/amplitudes.py
918 919 920 921 | |
__delitem__(key)
Source code in toast/templates/amplitudes.py
824 825 | |
__eq__(value)
Source code in toast/templates/amplitudes.py
865 866 867 868 869 870 871 872 873 874 875 876 | |
__getitem__(key)
Source code in toast/templates/amplitudes.py
821 822 | |
__iadd__(other)
Source code in toast/templates/amplitudes.py
878 879 880 881 882 883 884 885 886 | |
__imul__(other)
Source code in toast/templates/amplitudes.py
898 899 900 901 902 903 904 905 906 | |
__init__()
Source code in toast/templates/amplitudes.py
815 816 817 | |
__isub__(other)
Source code in toast/templates/amplitudes.py
888 889 890 891 892 893 894 895 896 | |
__iter__()
Source code in toast/templates/amplitudes.py
834 835 | |
__itruediv__(other)
Source code in toast/templates/amplitudes.py
908 909 910 911 912 913 914 915 916 | |
__len__()
Source code in toast/templates/amplitudes.py
837 838 | |
__mul__(other)
Source code in toast/templates/amplitudes.py
928 929 930 931 | |
__repr__()
Source code in toast/templates/amplitudes.py
840 841 842 843 844 845 | |
__setitem__(key, value)
Source code in toast/templates/amplitudes.py
827 828 829 830 831 832 | |
__sub__(other)
Source code in toast/templates/amplitudes.py
923 924 925 926 | |
__truediv__(other)
Source code in toast/templates/amplitudes.py
933 934 935 936 | |
_accel_create(zero_out=False)
Source code in toast/templates/amplitudes.py
997 998 999 1000 1001 | |
_accel_delete()
Source code in toast/templates/amplitudes.py
1015 1016 1017 1018 1019 | |
_accel_exists()
Source code in toast/templates/amplitudes.py
981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 | |
_accel_reset()
Source code in toast/templates/amplitudes.py
1021 1022 1023 1024 1025 | |
_accel_update_device()
Source code in toast/templates/amplitudes.py
1003 1004 1005 1006 1007 | |
_accel_update_host()
Source code in toast/templates/amplitudes.py
1009 1010 1011 1012 1013 | |
_check_other(other)
Source code in toast/templates/amplitudes.py
849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 | |
accel_used(state)
Source code in toast/templates/amplitudes.py
976 977 978 979 | |
dot(other)
Dot product of all corresponding Amplitudes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other
|
AmplitudesMap
|
The other instance. |
required |
Result
(float): The dot product.
Source code in toast/templates/amplitudes.py
955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 | |
duplicate()
Return a copy of the data.
Source code in toast/templates/amplitudes.py
948 949 950 951 952 953 | |
reset()
Set all amplitude values to zero.
Source code in toast/templates/amplitudes.py
938 939 940 941 | |
reset_flags()
Set all flag values to zero.
Source code in toast/templates/amplitudes.py
943 944 945 946 | |
toast.templates.Template
Bases: TraitConfig
Base class for timestream templates.
A template defines a mapping to / from timestream values to a set of template amplitudes. These amplitudes are usually quantities being solved as part of the map-making. Examples of templates might be destriping baseline offsets, azimuthally binned ground pickup, etc.
The template amplitude data may be distributed in a variety of ways. For some types of templates, every process may have their own unique set of amplitudes based on the data that they have locally. In other cases, every process may have a full local copy of all template amplitudes. There might also be cases where each process has a non-unique subset of amplitude values (similar to the way that pixel domain quantities are distributed).
Source code in toast/templates/template.py
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 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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | |
data = Instance(klass=Data, allow_none=True, help='This must be an instance of a Data class (or None)')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, allow_none=True, help='Observation detdata key for the timestream data')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Desired units of detector data')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for solver flags')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for solver flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/templates/template.py
98 99 | |
_add_prior(amplitudes_in, amplitudes_out, **kwargs)
Source code in toast/templates/template.py
208 209 210 | |
_add_to_signal(detector, amplitudes, **kwargs)
Source code in toast/templates/template.py
158 159 | |
_apply_precond(amplitudes_in, amplitudes_out, **kwargs)
Source code in toast/templates/template.py
234 235 | |
_check_data(proposal)
Source code in toast/templates/template.py
84 85 86 87 88 89 90 | |
_check_det_mask(proposal)
Source code in toast/templates/template.py
70 71 72 73 74 75 | |
_check_enabled(use_accel=None)
Source code in toast/templates/template.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | |
_check_flag_mask(proposal)
Source code in toast/templates/template.py
77 78 79 80 81 82 | |
_detectors()
Source code in toast/templates/template.py
124 125 126 | |
_initialize(new_data)
Source code in toast/templates/template.py
101 102 103 104 | |
_project_signal(detector, amplitudes, **kwargs)
Source code in toast/templates/template.py
183 184 | |
_zeros()
Source code in toast/templates/template.py
141 142 | |
add_prior(amplitudes_in, amplitudes_out, use_accel=None, **kwargs)
Apply the inverse amplitude covariance as a prior.
This performs:
.. math:: a' += {C_a}^{-1} \cdot a
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitudes_in
|
Amplitudes
|
The input Amplitude values for this template. |
required |
amplitudes_out
|
Amplitudes
|
The input Amplitude values for this template. |
required |
Returns:
| Type | Description |
|---|---|
|
None |
Source code in toast/templates/template.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | |
add_to_signal(detector, amplitudes, use_accel=None, **kwargs)
Accumulate the projected amplitudes to a timestream.
This performs the operation:
.. math:: s += F \cdot a
Where s is the det_data signal, F is the template and a is the amplitudes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
detector
|
str
|
The detector name. |
required |
amplitudes
|
Amplitudes
|
The Amplitude values for this template. |
required |
Returns:
| Type | Description |
|---|---|
|
None |
Source code in toast/templates/template.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
apply_precond(amplitudes_in, amplitudes_out, use_accel=None, **kwargs)
Apply the template preconditioner.
Formally, the preconditioner "M" is an approximation to the "design matrix" (the "A" matrix in "Ax = b"). This function applies the inverse preconditioner to the template amplitudes:
.. math:: a' += M^{-1} \cdot a
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitudes_in
|
Amplitudes
|
The input Amplitude values for this template. |
required |
amplitudes_out
|
Amplitudes
|
The input Amplitude values for this template. |
required |
Returns:
| Type | Description |
|---|---|
|
None |
Source code in toast/templates/template.py
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | |
detectors()
Return a list of detectors supported by the template.
This list will change whenever the data trait is set, which initializes
the template.
Returns:
| Type | Description |
|---|---|
list
|
The detectors with local amplitudes across all observations. |
Source code in toast/templates/template.py
128 129 130 131 132 133 134 135 136 137 138 139 | |
get_class_config(input=None)
classmethod
Return a dictionary of the default traits of an Template class.
This returns a new or appended dictionary. The class instance properties are contained in a dictionary found in result["templates"][cls.name].
If the specified named location in the input config already exists then an exception is raised.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
dict
|
The optional input dictionary to update. |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
The created or updated dictionary. |
Source code in toast/templates/template.py
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | |
get_class_config_path()
classmethod
Source code in toast/templates/template.py
261 262 263 | |
get_config(input=None)
Return a dictionary of the current traits of a Template instance.
This returns a new or appended dictionary. The operator instance properties are contained in a dictionary found in result["templates"][self.name].
If the specified named location in the input config already exists then an exception is raised.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
dict
|
The optional input dictionary to update. |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
The created or updated dictionary. |
Source code in toast/templates/template.py
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | |
get_config_path()
Source code in toast/templates/template.py
265 266 267 268 | |
initialize(change)
Source code in toast/templates/template.py
92 93 94 95 96 | |
project_signal(detector, amplitudes, use_accel=None, **kwargs)
Project a timestream into template amplitudes.
This performs:
.. math:: a += F^T \cdot s
Where s is the det_data signal, F is the template and a is the amplitudes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
detector
|
str
|
The detector name. |
required |
amplitudes
|
Amplitudes
|
The Amplitude values for this template. |
required |
Returns:
| Type | Description |
|---|---|
|
None |
Source code in toast/templates/template.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | |
translate(props)
classmethod
Given a config dictionary, modify it to match the current API.
Source code in toast/templates/template.py
307 308 309 310 311 312 313 314 315 316 | |
zeros()
Return an Amplitudes object filled with zeros.
This returns an Amplitudes instance with appropriate dimensions for this
template. This will raise an exception if called before the data trait
is set.
Returns:
| Type | Description |
|---|---|
Amplitudes
|
Zero amplitudes. |
Source code in toast/templates/template.py
144 145 146 147 148 149 150 151 152 153 154 155 156 | |
toast.templates.Offset
Bases: Template
This class represents noise fluctuations as a step function.
Every process stores the amplitudes for its local data, which is disjoint from the amplitudes on other processes. We project amplitudes one detector at a time, and so we arrange our template amplitudes in "detector major" order and store offsets into this for each observation.
Source code in toast/templates/offset/offset.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 | |
debug_plots = Unicode(None, allow_none=True, help='If not None, make debugging plots in this directory')
class-attribute
instance-attribute
good_fraction = Float(0.5, help='Fraction of unflagged samples needed to keep a given offset amplitude')
class-attribute
instance-attribute
noise_model = Unicode(None, allow_none=True, help='Observation key containing the optional noise model')
class-attribute
instance-attribute
precond_width = Int(20, help='Preconditioner width in terms of offsets / baselines')
class-attribute
instance-attribute
step_time = Quantity(10000.0 * u.second, help='Time per baseline step')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
use_noise_prior = Bool(False, help='Use detector PSDs to build the noise prior and preconditioner')
class-attribute
instance-attribute
__del__()
Source code in toast/templates/offset/offset.py
107 108 | |
__init__(**kwargs)
Source code in toast/templates/offset/offset.py
96 97 | |
_add_prior(amplitudes_in, amplitudes_out, use_accel=None, **kwargs)
Source code in toast/templates/offset/offset.py
814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 | |
_add_to_signal(detector, amplitudes, use_accel=None, **kwargs)
Source code in toast/templates/offset/offset.py
660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 | |
_apply_precond(amplitudes_in, amplitudes_out, use_accel=None, **kwargs)
Source code in toast/templates/offset/offset.py
890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 | |
_check_good_fraction(proposal)
Source code in toast/templates/offset/offset.py
89 90 91 92 93 94 | |
_check_precond_width(proposal)
Source code in toast/templates/offset/offset.py
82 83 84 85 86 87 | |
_detectors()
Source code in toast/templates/offset/offset.py
648 649 | |
_get_offset_psd(noise, freq, step_time, det)
Compute the PSD of the baseline offsets.
Source code in toast/templates/offset/offset.py
596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 | |
_implementations()
Source code in toast/templates/offset/offset.py
964 965 966 967 968 969 970 | |
_initialize(new_data)
Source code in toast/templates/offset/offset.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 | |
_interpolate_psd(x, lfreq, lpsd)
Source code in toast/templates/offset/offset.py
537 538 539 540 541 542 543 544 545 546 547 548 | |
_project_signal(detector, amplitudes, use_accel=None, **kwargs)
Source code in toast/templates/offset/offset.py
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 | |
_remove_white_noise(freq, psd)
Remove the white noise component of the PSD.
Source code in toast/templates/offset/offset.py
560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 | |
_step_length(stime, rate)
Source code in toast/templates/offset/offset.py
657 658 | |
_supports_accel()
Source code in toast/templates/offset/offset.py
972 973 | |
_truncate(noisefilter, lim=0.0001)
Source code in toast/templates/offset/offset.py
550 551 552 553 554 555 556 557 558 | |
_zeros()
Source code in toast/templates/offset/offset.py
651 652 653 654 655 | |
clear()
Delete the underlying C-allocated memory.
Source code in toast/templates/offset/offset.py
99 100 101 102 103 104 105 | |
write(amplitudes, out)
Write out amplitude values.
This stores the amplitudes to files for debugging / plotting. Since the Offset amplitudes are unique on each process, we open one file per process group and each process in the group communicates their amplitudes to one writer.
Since this function is used mainly for debugging, we are a bit wasteful and duplicate the amplitudes in order to make things easier.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitudes
|
Amplitudes
|
The amplitude data. |
required |
out
|
str
|
The output file root. |
required |
Returns:
| Type | Description |
|---|---|
|
None |
Source code in toast/templates/offset/offset.py
975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 | |
toast.templates.Periodic
Bases: Template
This template represents amplitudes which are periodic in time.
The template amplitudes are modeled as a value for each detector of each observation in a "bin" of the specified data values. The min / max values of the periodic data are computed for each observation, and the binning between these min / max values is set by either the n_bins trait or by specifying the increment in the value to use for each bin.
Although the data values used do not have to be strictly periodic, this template works best if the values are varying in a regular way such that each bin has approximately the same number of hits.
The periodic quantity to consider can be either a shared or detdata field.
Source code in toast/templates/periodic.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 | |
bins = Int(10, allow_none=True, help='Number of bins between min / max values of data key')
class-attribute
instance-attribute
flag_mask = Int(0, help='Bit mask value for flags')
class-attribute
instance-attribute
flags = Unicode(None, allow_none=True, help='Observation data key for flags to use')
class-attribute
instance-attribute
increment = Float(None, allow_none=True, help='The increment of the data key for each bin')
class-attribute
instance-attribute
is_detdata_key = Bool(False, help='If True, the periodic data and flags are detector fields, not shared')
class-attribute
instance-attribute
key = Unicode(None, allow_none=True, help='Observation data key for the periodic quantity')
class-attribute
instance-attribute
minimum_bin_hits = Int(3, help='Minimum number of samples per amplitude bin')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/templates/periodic.py
83 84 | |
_add_prior(amplitudes_in, amplitudes_out, **kwargs)
Source code in toast/templates/periodic.py
392 393 394 | |
_add_to_signal(detector, amplitudes, **kwargs)
Source code in toast/templates/periodic.py
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | |
_apply_precond(amplitudes_in, amplitudes_out, **kwargs)
Source code in toast/templates/periodic.py
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | |
_detectors()
Source code in toast/templates/periodic.py
275 276 | |
_initialize(new_data)
Source code in toast/templates/periodic.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | |
_project_signal(detector, amplitudes, **kwargs)
Source code in toast/templates/periodic.py
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 | |
_view_flags_and_index(det_indx, ob_indx, ob, view, flag_indx=None, det_flags=False)
Get the flags and amplitude indices for one detector and view.
Source code in toast/templates/periodic.py
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | |
_zeros()
Source code in toast/templates/periodic.py
278 279 280 281 282 | |
write(amplitudes, out)
Write out amplitude values.
This stores the amplitudes to a file for debugging / plotting.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitudes
|
Amplitudes
|
The amplitude data. |
required |
out
|
str
|
The output file. |
required |
Returns:
| Type | Description |
|---|---|
|
None |
Source code in toast/templates/periodic.py
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 | |
toast.templates.SubHarmonic
Bases: Template
This class represents sub-harmonic noise fluctuations.
Sub-harmonic means that the characteristic frequency of the noise modes is lower than 1/T where T is the length of the interval being fitted.
Every process stores the amplitudes for its local data, which is disjoint from the amplitudes on other processes. We project amplitudes one detector at a time, and so we arrange our template amplitudes in "detector major" order and store offsets into this for each observation.
Source code in toast/templates/subharmonic.py
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 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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | |
noise_model = Unicode(None, allow_none=True, help='Observation key containing the optional noise model')
class-attribute
instance-attribute
order = Int(1, help='The filter order')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/templates/subharmonic.py
54 55 | |
_add_prior(amplitudes_in, amplitudes_out, **kwargs)
Source code in toast/templates/subharmonic.py
212 213 214 | |
_add_to_signal(detector, amplitudes, **kwargs)
Source code in toast/templates/subharmonic.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |
_apply_precond(amplitudes_in, amplitudes_out, **kwargs)
Source code in toast/templates/subharmonic.py
216 217 218 219 220 221 222 223 224 225 226 227 228 | |
_detectors()
Source code in toast/templates/subharmonic.py
173 174 | |
_initialize(new_data)
Source code in toast/templates/subharmonic.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |
_project_signal(detector, amplitudes, **kwargs)
Source code in toast/templates/subharmonic.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 | |
_zeros()
Source code in toast/templates/subharmonic.py
176 177 178 179 180 | |
toast.templates.Fourier2D
Bases: Template
This class models 2D Fourier modes across the focalplane.
Since the modes are shared across detectors, our amplitudes are organized by observation and views within each observation. Each detector projection will traverse all the local amplitudes.
Source code in toast/templates/fourier2d.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 | |
correlation_amplitude = Float(10.0, help='Scale factor of the filter')
class-attribute
instance-attribute
correlation_length = Quantity(10.0 * u.second, help='Correlation length in time')
class-attribute
instance-attribute
debug_plots = Unicode(None, allow_none=True, help='If not None, make debugging plots in this directory')
class-attribute
instance-attribute
fit_subharmonics = Bool(True, help='If True, fit subharmonics')
class-attribute
instance-attribute
noise_model = Unicode(None, allow_none=True, help='Observation key containing the optional noise model')
class-attribute
instance-attribute
order = Int(1, help='The filter order')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
__del__()
Source code in toast/templates/fourier2d.py
86 87 | |
__init__(**kwargs)
Source code in toast/templates/fourier2d.py
75 76 | |
_add_prior(amplitudes_in, amplitudes_out, **kwargs)
Source code in toast/templates/fourier2d.py
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | |
_add_to_signal(detector, amplitudes, **kwargs)
Source code in toast/templates/fourier2d.py
387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 | |
_apply_precond(amplitudes_in, amplitudes_out, **kwargs)
Source code in toast/templates/fourier2d.py
449 450 451 | |
_check_order(proposal)
Source code in toast/templates/fourier2d.py
68 69 70 71 72 73 | |
_detectors()
Source code in toast/templates/fourier2d.py
370 371 | |
_initialize(new_data)
Source code in toast/templates/fourier2d.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | |
_project_signal(detector, amplitudes, **kwargs)
Source code in toast/templates/fourier2d.py
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 | |
_zeros()
Source code in toast/templates/fourier2d.py
373 374 375 376 377 378 379 380 381 382 383 384 385 | |
clear()
Delete the underlying C-allocated memory.
Source code in toast/templates/fourier2d.py
78 79 80 81 82 83 84 | |
toast.templates.GainTemplate
Bases: Template
This class aims at fitting and mitigating gain fluctuations in the data.
The fluctuations are modeled as a linear combination of Legendre polynomials (up
to a given order, commonly n<5 ) weighted by the so called gain amplitudes.
The gain template is therefore obtained by estimating the polynomial amplitudes by
assuming a signal estimate provided by a template map (encoding a coarse estimate
of the underlying signal.)
Source code in toast/templates/gaintemplate.py
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 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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | |
noise_model = Unicode(None, allow_none=True, help='Observation key containing the noise model ')
class-attribute
instance-attribute
order = Int(1, help='The order of Legendre polynomials to fit the gain amplitudes ')
class-attribute
instance-attribute
template_name = Unicode(None, allow_none=True, help='detdata key encoding the signal estimate to fit the gain amplitudes')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/templates/gaintemplate.py
52 53 | |
_add_prior(amplitudes_in, amplitudes_out, **kwargs)
Source code in toast/templates/gaintemplate.py
214 215 216 | |
_add_to_signal(detector, amplitudes, **kwargs)
Source code in toast/templates/gaintemplate.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |
_apply_precond(amplitudes_in, amplitudes_out, **kwargs)
Source code in toast/templates/gaintemplate.py
218 219 220 221 222 223 224 225 226 227 228 229 230 | |
_detectors()
Source code in toast/templates/gaintemplate.py
165 166 | |
_get_polynomials(N)
Source code in toast/templates/gaintemplate.py
55 56 57 58 59 60 61 | |
_initialize(new_data)
Source code in toast/templates/gaintemplate.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | |
_project_signal(detector, amplitudes, **kwargs)
Source code in toast/templates/gaintemplate.py
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | |
_zeros()
Source code in toast/templates/gaintemplate.py
168 169 170 171 172 | |
toast.ops.TemplateMatrix
Bases: Operator
Operator for projecting or accumulating template amplitudes.
Source code in toast/ops/mapmaker_templates.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 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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
_initialized = False
instance-attribute
amplitudes = Unicode(None, allow_none=True, help='Data key for template amplitudes')
class-attribute
instance-attribute
det_data = Unicode(None, allow_none=True, help='Observation detdata key for the timestream data')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
n_enabled_templates
property
templates = List([], help='This should be a list of Template instances')
class-attribute
instance-attribute
transpose = Bool(False, help='If True, apply the transpose.')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/mapmaker_templates.py
95 96 97 | |
_check_det_mask(proposal)
Source code in toast/ops/mapmaker_templates.py
71 72 73 74 75 76 | |
_check_flag_mask(proposal)
Source code in toast/ops/mapmaker_templates.py
78 79 80 81 82 83 | |
_check_templates(proposal)
Source code in toast/ops/mapmaker_templates.py
85 86 87 88 89 90 91 92 93 | |
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/mapmaker_templates.py
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 | |
_finalize(data, use_accel=None, **kwargs)
Source code in toast/ops/mapmaker_templates.py
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | |
_implementations()
Find implementations supported by all the templates
Source code in toast/ops/mapmaker_templates.py
386 387 388 389 390 391 392 393 394 395 396 397 398 | |
_provides()
Source code in toast/ops/mapmaker_templates.py
378 379 380 381 382 383 384 | |
_requires()
Source code in toast/ops/mapmaker_templates.py
366 367 368 369 370 371 372 373 374 375 376 | |
_supports_accel()
Returns True if all the templates are GPU compatible.
Source code in toast/ops/mapmaker_templates.py
400 401 402 403 404 405 406 407 408 409 410 | |
add_prior(amps_in, amps_out, use_accel=None, **kwargs)
Apply the noise prior from all templates to the amplitudes.
This can only be called after the operator has been used at least once so that the templates are initialized.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amps_in
|
AmplitudesMap
|
The input amplitudes. |
required |
amps_out
|
AmplitudesMap
|
The output amplitudes, modified in place. |
required |
Returns:
| Type | Description |
|---|---|
|
None |
Source code in toast/ops/mapmaker_templates.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | |
apply_precond(amps_in, amps_out, use_accel=None, **kwargs)
Apply the preconditioner from all templates to the amplitudes.
This can only be called after the operator has been used at least once so that the templates are initialized.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amps_in
|
AmplitudesMap
|
The input amplitudes. |
required |
amps_out
|
AmplitudesMap
|
The output amplitudes, modified in place. |
required |
Returns:
| Type | Description |
|---|---|
|
None |
Source code in toast/ops/mapmaker_templates.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | |
duplicate()
Make a shallow copy which contains the same list of templates.
This is useful when we want to use both a template matrix and its transpose in the same pipeline.
Returns:
| Type | Description |
|---|---|
TemplateMatrix
|
A new instance with the same templates. |
Source code in toast/ops/mapmaker_templates.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | |
initialize(data, use_accel=False)
Source code in toast/ops/mapmaker_templates.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | |
reset()
Reset templates to allow re-initialization on a new Data object.
Source code in toast/ops/mapmaker_templates.py
99 100 101 | |
reset_templates()
Mark templates to be re-initialized on next call to exec().
Source code in toast/ops/mapmaker_templates.py
190 191 192 | |
toast.ops.SolveAmplitudes
Bases: Operator
Solve for template amplitudes.
This operator solves for a maximum likelihood set of template amplitudes that model the timestream contributions from noise, systematics, etc:
.. math:: \left[ M^T N^{-1} Z M + M_p ight] a = M^T N^{-1} Z d
Where a are the solved amplitudes and d is the input data. N is the
diagonal time domain noise covariance. M is a matrix of templates that
project from the amplitudes into the time domain, and the Z operator is given
by:
.. math:: Z = I - P (P^T N^{-1} P)^{-1} P^T N^{-1}
or in terms of the binning operation:
.. math:: Z = I - P B
Where P is the pointing matrix. This operator takes one operator for the
template matrix M and one operator for the binning, B. It then
uses a conjugate gradient solver to solve for the amplitudes.
Source code in toast/ops/mapmaker_templates.py
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
amplitudes = Unicode(None, allow_none=True, help='Data key for output amplitudes')
class-attribute
instance-attribute
binning = Instance(klass=Operator, allow_none=True, help='Binning operator used for solving template amplitudes')
class-attribute
instance-attribute
convergence = Float(1e-12, help='Relative convergence limit')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key for the timestream data')
class-attribute
instance-attribute
iter_max = Int(100, help='Maximum number of iterations')
class-attribute
instance-attribute
iter_min = Int(3, help='Minimum number of iterations')
class-attribute
instance-attribute
keep_solver_products = Bool(False, help='If True, keep the map domain solver products in data')
class-attribute
instance-attribute
map_rcond_threshold = Float(1e-08, help='For final map, minimum value for inverse pixel condition number cut.')
class-attribute
instance-attribute
mask = Unicode(None, allow_none=True, help='Data key for pixel mask to use in solving. First bit of pixel values is tested')
class-attribute
instance-attribute
mc_index = Int(None, allow_none=True, help='The Monte-Carlo index')
class-attribute
instance-attribute
mc_mode = Bool(False, help='If True, re-use solver flags, sparse covariances, etc')
class-attribute
instance-attribute
output_dir = Unicode('.', help='Write output data products to this directory')
class-attribute
instance-attribute
report_memory = Bool(False, help='Report memory throughout the execution')
class-attribute
instance-attribute
reset_pix_dist = Bool(False, help='Clear any existing pixel distribution. Useful when applying repeatedly to different data objects.')
class-attribute
instance-attribute
solve_rcond_threshold = Float(1e-08, help='When solving, minimum value for inverse pixel condition number cut.')
class-attribute
instance-attribute
template_matrix = Instance(klass=Operator, allow_none=True, help='This must be an instance of a template matrix operator')
class-attribute
instance-attribute
write_hdf5 = Bool(False, help='If True, outputs are in HDF5 rather than FITS format.')
class-attribute
instance-attribute
write_hdf5_serial = Bool(False, help='If True, force serial HDF5 write of output maps.')
class-attribute
instance-attribute
write_solver_products = Bool(False, help='If True, write out solver products')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/mapmaker_templates.py
546 547 | |
_check_binning(proposal)
Source code in toast/ops/mapmaker_templates.py
518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | |
_cleanup()
Clean up convenience members for _exec()
Source code in toast/ops/mapmaker_templates.py
1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 | |
_count_cut_data()
Collect and report statistics about cut data
Source code in toast/ops/mapmaker_templates.py
800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 | |
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/mapmaker_templates.py
1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 | |
_finalize(data, **kwargs)
Source code in toast/ops/mapmaker_templates.py
1115 1116 | |
_get_pixel_covariance(solve_pixels, solve_weights)
Construct the noise covariance, hits, and condition number map for the solver.
Source code in toast/ops/mapmaker_templates.py
830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 | |
_get_rcond_mask(scan_pipe)
Construct the noise covariance, hits, and condition number mask for the solver.
Source code in toast/ops/mapmaker_templates.py
882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 | |
_get_rhs()
Compute the RHS. Overwrite inputs, either the original or the copy
Source code in toast/ops/mapmaker_templates.py
929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 | |
_prepare_flagging(scan_pipe)
Flagging. We create a new set of data flags for the solver that includes: - one bit for a bitwise OR of all detector / shared flags - one bit for any pixel mask, projected to TOD - one bit for any poorly conditioned pixels, projected to TOD
Source code in toast/ops/mapmaker_templates.py
751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 | |
_prepare_flagging_ob(ob)
Process a single observation, used by _prepare_flagging
Copies and masks existing flags
Source code in toast/ops/mapmaker_templates.py
684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 | |
_prepare_pixels()
Optionally destroy existing pixel distributions (useful if calling repeatedly with different data objects)
Source code in toast/ops/mapmaker_templates.py
638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 | |
_provides()
Source code in toast/ops/mapmaker_templates.py
1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 | |
_requires()
Source code in toast/ops/mapmaker_templates.py
1118 1119 1120 1121 1122 1123 1124 | |
_setup(data, detectors, use_accel)
Set up convenience members used in the _exec() method
Source code in toast/ops/mapmaker_templates.py
574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 | |
_solve_amplitudes()
Solve the destriping equation
Source code in toast/ops/mapmaker_templates.py
979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 | |
_write_del(prod_key)
Write and optionally delete map object
Source code in toast/ops/mapmaker_templates.py
549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | |
High Level Tools
toast.ops.Calibrate
Bases: Operator
Operator for calibrating timestreams using solved templates.
This operator first solves for a maximum likelihood set of template amplitudes that model the timestream contributions from noise, systematics, etc:
.. math:: \left[ M^T N^{-1} Z M + M_p \right] a = M^T N^{-1} Z d
Where a are the solved amplitudes and d is the input data. N is the
diagonal time domain noise covariance. M is a matrix of templates that
project from the amplitudes into the time domain, and the Z operator is given
by:
.. math:: Z = I - P (P^T N^{-1} P)^{-1} P^T N^{-1}
or in terms of the binning operation:
.. math:: Z = I - P B
Where P is the pointing matrix. This operator takes one operator for the
template matrix M and one operator for the binning, B. It then
uses a conjugate gradient solver to solve for the amplitudes.
After solving for the template amplitudes, they are projected into the time domain and the input data is element-wise divided by this.
If the result trait is not set, then the input is overwritten.
Source code in toast/ops/mapmaker.py
749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
binning = Instance(klass=Operator, allow_none=True, help='Binning operator used for solving template amplitudes')
class-attribute
instance-attribute
convergence = Float(1e-12, help='Relative convergence limit')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key for the timestream data')
class-attribute
instance-attribute
iter_max = Int(100, help='Maximum number of iterations')
class-attribute
instance-attribute
iter_min = Int(3, help='Minimum number of iterations')
class-attribute
instance-attribute
keep_solver_products = Bool(False, help='If True, keep the map domain solver products in data')
class-attribute
instance-attribute
mask = Unicode(None, allow_none=True, help='Data key for pixel mask to use in solving. First bit of pixel values is tested')
class-attribute
instance-attribute
mc_index = Int(None, allow_none=True, help='The Monte-Carlo index')
class-attribute
instance-attribute
mc_mode = Bool(False, help='If True, re-use solver flags, sparse covariances, etc')
class-attribute
instance-attribute
mc_root = Unicode(None, allow_node=True, help='Root name for Monte Carlo products')
class-attribute
instance-attribute
report_memory = Bool(False, help='Report memory throughout the execution')
class-attribute
instance-attribute
reset_pix_dist = Bool(False, help='Clear any existing pixel distribution. Useful when applying repeatedly to different data objects.')
class-attribute
instance-attribute
result = Unicode(None, allow_none=True, help='Observation detdata key for the output')
class-attribute
instance-attribute
solve_rcond_threshold = Float(1e-08, help='When solving, minimum value for inverse pixel condition number cut.')
class-attribute
instance-attribute
template_matrix = Instance(klass=Operator, allow_none=True, help='This must be an instance of a template matrix operator')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/mapmaker.py
842 843 | |
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/mapmaker.py
845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 | |
_finalize(data, **kwargs)
Source code in toast/ops/mapmaker.py
927 928 | |
_provides()
Source code in toast/ops/mapmaker.py
938 939 940 941 942 943 | |
_requires()
Source code in toast/ops/mapmaker.py
930 931 932 933 934 935 936 | |
toast.ops.MapMaker
Bases: Operator
Operator for making maps.
This operator first solves for a maximum likelihood set of template amplitudes that model the timestream contributions from noise, systematics, etc:
.. math:: \left[ M^T N^{-1} Z M + M_p \right] a = M^T N^{-1} Z d
Where a are the solved amplitudes and d is the input data. N is the
diagonal time domain noise covariance. M is a matrix of templates that
project from the amplitudes into the time domain, and the Z operator is given
by:
.. math:: Z = I - P (P^T N^{-1} P)^{-1} P^T N^{-1}
or in terms of the binning operation:
.. math:: Z = I - P B
Where P is the pointing matrix. This operator takes one operator for the
template matrix M and one operator for the binning, B. It then
uses a conjugate gradient solver to solve for the amplitudes.
After solving for the template amplitudes, a final map of the signal estimate is computed using a simple binning:
.. math:: MAP = ({P'}^T N^{-1} P')^{-1} {P'}^T N^{-1} (y - M a)
Where the "prime" indicates that this final map might be computed using a different pointing matrix than the one used to solve for the template amplitudes.
The template-subtracted detector timestreams are saved either in the input
det_data key of each observation, or (if overwrite == False) in an obs.detdata
key based on the name of this class instance.
Source code in toast/ops/mapmaker.py
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
binning = Instance(klass=Operator, allow_none=True, help='Binning operator used for solving template amplitudes')
class-attribute
instance-attribute
convergence = Float(1e-12, help='Relative convergence limit')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key for the timestream data')
class-attribute
instance-attribute
iter_max = Int(100, help='Maximum number of iterations')
class-attribute
instance-attribute
iter_min = Int(3, help='Minimum number of iterations')
class-attribute
instance-attribute
keep_final_products = Bool(False, help='If True, keep the map domain products in data after write')
class-attribute
instance-attribute
keep_solver_products = Bool(False, help='If True, keep the map domain solver products in data')
class-attribute
instance-attribute
map_binning = Instance(klass=Operator, allow_none=True, help='Binning operator for final map making. Default is same as solver')
class-attribute
instance-attribute
map_rcond_threshold = Float(1e-08, help='For final map, minimum value for inverse pixel condition number cut.')
class-attribute
instance-attribute
mask = Unicode(None, allow_none=True, help='Data key for pixel mask to use in solving. First bit of pixel values is tested')
class-attribute
instance-attribute
mc_index = Int(None, allow_none=True, help='The Monte-Carlo index')
class-attribute
instance-attribute
mc_mode = Bool(False, help='If True, re-use solver flags, sparse covariances, etc')
class-attribute
instance-attribute
output_dir = Unicode('.', help='Write output data products to this directory')
class-attribute
instance-attribute
overwrite_cleaned = Bool(False, help='If True and save_cleaned is True, overwrite the input data')
class-attribute
instance-attribute
report_memory = Bool(False, help='Report memory throughout the execution')
class-attribute
instance-attribute
reset_pix_dist = Bool(False, help='Clear any existing pixel distribution. Useful when applying repeatedly to different data objects.')
class-attribute
instance-attribute
save_cleaned = Bool(False, help='If True, save the template-subtracted detector timestreams')
class-attribute
instance-attribute
solve_rcond_threshold = Float(1e-08, help='When solving, minimum value for inverse pixel condition number cut.')
class-attribute
instance-attribute
template_matrix = Instance(klass=Operator, allow_none=True, help='This must be an instance of a template matrix operator')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
write_binmap = Bool(True, help='If True, write the projected map *before* template subtraction')
class-attribute
instance-attribute
write_cov = Bool(True, help='If True, write the white noise covariance matrices.')
class-attribute
instance-attribute
write_hdf5 = Bool(False, help='If True, outputs are in HDF5 rather than FITS format.')
class-attribute
instance-attribute
write_hdf5_serial = Bool(False, help='If True, force serial HDF5 write of output maps.')
class-attribute
instance-attribute
write_hits = Bool(True, help='If True, write the hits map')
class-attribute
instance-attribute
write_invcov = Bool(False, help='If True, write the inverse white noise covariance matrices.')
class-attribute
instance-attribute
write_map = Bool(True, help='If True, write the projected map')
class-attribute
instance-attribute
write_noiseweighted_map = Bool(False, help='If True, write the noise-weighted map')
class-attribute
instance-attribute
write_rcond = Bool(True, help='If True, write the reciprocal condition numbers.')
class-attribute
instance-attribute
write_solver_products = Bool(False, help='If True, write out equivalent solver products.')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/mapmaker.py
213 214 | |
_bin_and_write_raw_signal(map_binning, extra_header=None)
Optionally bin and save an undestriped map
Source code in toast/ops/mapmaker.py
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | |
_bin_cleaned_signal(map_binning, out_cleaned)
Bin and save a map of the destriped signal
Source code in toast/ops/mapmaker.py
540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
_build_pixel_covariance(map_binning)
Accumulate hits and pixel covariance
Source code in toast/ops/mapmaker.py
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 | |
_check_map_binning(proposal)
Source code in toast/ops/mapmaker.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
_clean_signal(template_amplitudes)
Source code in toast/ops/mapmaker.py
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 | |
_closeout()
Explicitly delete members used by the _exec() method
Source code in toast/ops/mapmaker.py
617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 | |
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/mapmaker.py
675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 | |
_finalize(data, **kwargs)
Source code in toast/ops/mapmaker.py
727 728 | |
_fit_templates()
Solve for template amplitudes
Source code in toast/ops/mapmaker.py
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | |
_get_extra_header(data, detectors)
Extract useful information from the data object to record in map headers
Source code in toast/ops/mapmaker.py
634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 | |
_prepare_binning()
Set up the final map binning
Source code in toast/ops/mapmaker.py
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 | |
_provides()
Source code in toast/ops/mapmaker.py
740 741 742 743 744 745 746 | |
_purge_cleaned_tod()
If the cleaned TOD is not being returned, purge it
Source code in toast/ops/mapmaker.py
573 574 575 576 577 578 579 580 581 582 583 584 585 586 | |
_requires()
Source code in toast/ops/mapmaker.py
730 731 732 733 734 735 736 737 738 | |
_setup(data, detectors, use_accel)
Set up convenience members used in the _exec() method
Source code in toast/ops/mapmaker.py
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | |
_write_del(prod_key, prod_write, force, rootname, extra_header=None)
Write data object to file and delete it from cache
Source code in toast/ops/mapmaker.py
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | |
_write_maps(extra_header=None)
Write and delete the outputs
Source code in toast/ops/mapmaker.py
588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 | |
External Tools
toast.ops.Madam
Bases: Operator
Operator which passes data to libmadam for map-making.
Source code in toast/ops/madam.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 | |
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
_cached = False
instance-attribute
_logprefix = 'Madam:'
instance-attribute
copy_groups = Int(1, help='The processes on each node are split into this number of groups to copy data in turns')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key for the timestream data')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
det_out = Unicode(None, allow_none=True, help='Observation detdata key for output destriped timestreams')
class-attribute
instance-attribute
mcmode = Bool(False, help='If true, Madam will store auxiliary information such as pixel matrices and noise filter.')
class-attribute
instance-attribute
mem_report = Bool(False, help='Print system memory use while staging / unstaging data.')
class-attribute
instance-attribute
noise_model = Unicode('noise_model', help='Observation key containing the noise model')
class-attribute
instance-attribute
noise_scale = Unicode('noise_scale', help='Observation key with optional scaling factor for noise PSDs')
class-attribute
instance-attribute
paramfile = Unicode(None, allow_none=True, help='Read madam parameters from this file')
class-attribute
instance-attribute
params = Dict({}, help='Parameters to pass to madam')
class-attribute
instance-attribute
pixel_pointing = Instance(klass=Operator, allow_none=True, help='This must be an instance of a pixel pointing operator')
class-attribute
instance-attribute
purge_det_data = Bool(False, help='If True, clear all observation detector data after copying to madam buffers')
class-attribute
instance-attribute
restore_det_data = Bool(False, help='If True, restore detector data to observations on completion')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_nonscience, help='Bit mask value for optional shared flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
stokes_weights = Instance(klass=Operator, allow_none=True, help='This must be an instance of a Stokes weights operator')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
translate_timestamps = Bool(False, help='Translate timestamps to enforce monotonity.')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__del__()
Source code in toast/ops/madam.py
328 329 | |
__init__(**kwargs)
Source code in toast/ops/madam.py
302 303 304 305 | |
_check_det_flag_mask(proposal)
Source code in toast/ops/madam.py
228 229 230 231 232 233 | |
_check_det_mask(proposal)
Source code in toast/ops/madam.py
214 215 216 217 218 219 | |
_check_det_out(proposal)
Source code in toast/ops/madam.py
248 249 250 251 252 253 254 255 | |
_check_params(proposal)
Source code in toast/ops/madam.py
287 288 289 290 291 292 293 294 295 296 297 298 299 300 | |
_check_pixel_pointing(proposal)
Source code in toast/ops/madam.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 | |
_check_restore_det_data(proposal)
Source code in toast/ops/madam.py
235 236 237 238 239 240 241 242 243 244 245 246 | |
_check_shared_flag_mask(proposal)
Source code in toast/ops/madam.py
221 222 223 224 225 226 | |
_check_stokes_weights(proposal)
Source code in toast/ops/madam.py
272 273 274 275 276 277 278 279 280 281 282 283 284 285 | |
_destripe(params, data, dets, interval_starts, psdinfo)
Destripe the buffered data
Source code in toast/ops/madam.py
1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 | |
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/madam.py
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 | |
_finalize(data, **kwargs)
Source code in toast/ops/madam.py
478 479 | |
_prepare(params, data, detectors)
Examine the data and determine quantities needed to set up Madam buffers
Source code in toast/ops/madam.py
504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 | |
_provides()
Source code in toast/ops/madam.py
1118 1119 | |
_requires()
Source code in toast/ops/madam.py
1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 | |
_stage_data(params, data, all_dets, nsamp, nnz, nnz_full, nnz_stride, interval_starts, psd_freqs)
Create madam-compatible buffers.
Collect the data into Madam buffers. If we are purging TOAST data to save memory, then optionally limit the number of processes that are copying at once.
Source code in toast/ops/madam.py
664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 | |
_unstage_data(params, data, all_dets, nsamp, nnz, nnz_full, interval_starts, signal_dtype)
Restore data to TOAST observations.
Optionally copy the signal and pointing back to TOAST if we previously purged it to save memory. Also copy the destriped timestreams if desired.
Source code in toast/ops/madam.py
957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 | |
clear()
Delete the underlying memory.
This will forcibly delete the C-allocated memory and invalidate all python references to the buffers.
Source code in toast/ops/madam.py
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | |
toast.ops.madam_params_from_mapmaker(mapmaker)
Utility function that configures Madam to match the TOAST mapmaker
Source code in toast/ops/madam.py
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 | |