amstrax package
Subpackages
Submodules
amstrax.SiPMdata module
- class amstrax.SiPMdata.GeoParameters(z_plane, r_cylinder, r_sipm)[source]
Bases:
objectDefinition of the key parameters needed for the simulations
- class amstrax.SiPMdata.Reconstruction(geo)[source]
Bases:
object- emulate_events(n_uv, n_event, **kwargs)[source]
emulate_events:: Generate events and then reconstruct them * All UV photons are assumed to originate from the location at which they where simulated * The recorded number of photons on each SiPM = n_exp * n_uv with
nexp the number of expected photons on a SiPM / UV photon
n_uv the number of photons from the S2 signal
amstrax.common module
amstrax.contexts module
- amstrax.contexts.amstrax_gas_test_analysis()[source]
Return strax test for analysis of Xams gas test data
- amstrax.contexts.amstrax_gas_test_analysis_alt_baseline()[source]
Return strax test for analysis of Xams gas test data
- amstrax.contexts.amstrax_run10_analysis(output_folder='./strax_data')[source]
Return strax test for analysis of Xams gas test data
- amstrax.contexts.context_for_daq_reader(st: strax.context.Context, run_id: str, runs_col_kwargs: Optional[dict] = None, run_doc: Optional[dict] = None, check_exists=True)[source]
Given a context and run_id, change the options such that we can process the live data.
IMPORTANT: After setting the context, we specify the location of the live-data for a single run. This means you CANNOT re-use this context! Therefore, if you want to process data, you should start a new context if you want to process another run starting from the live data
- Parameters
st – Context to change
run_id – the run_id of the run that should be processed
runs_col_kwargs – Optional options (kwargs) for starting the run-collection, see get_mongo_collection
run_doc – Optional document associated with this run-id.
- Returns
Context ready to start processing <run_id> with from the live-data
amstrax.hitfinder_thresholds module
amstrax.itp_map module
- class amstrax.itp_map.InterpolateAndExtrapolate(points, values, neighbours_to_use=None)[source]
Bases:
objectLinearly interpolate- and extrapolate using inverse-distance weighted averaging between nearby points.
- class amstrax.itp_map.InterpolatingMap(data)[source]
Bases:
objectCorrection map that computes values using inverse-weighted distance interpolation.
- The map must be specified as a json translating to a dictionary like this:
‘coordinate_system’ : [[x1, y1], [x2, y2], [x3, y3], [x4, y4], …], ‘map’ : [value1, value2, value3, value4, …] ‘another_map’ : idem ‘name’: ‘Nice file with maps’, ‘description’: ‘Say what the maps are, who you are, etc’, ‘timestamp’: unix epoch seconds timestamp
with the straightforward generalization to 1d and 3d.
The default map name is ‘map’, I’d recommend you use that.
- For a 0d placeholder map, use
‘points’: [], ‘map’: 42, etc
- data_field_names = ['timestamp', 'description', 'coordinate_system', 'name', 'irregular']
amstrax.rundb module
- class amstrax.rundb.RunDB(mongo_dbname=None, mongo_collname=None, runid_field='name', local_only=True, new_data_path=None, reader_ini_name_is_mode=False, readonly=True, *args, **kwargs)[source]
Bases:
strax.storage.common.StorageFrontendFrontend that searches RunDB MongoDB for data.
Loads appropriate backends ranging from Files to S3.
- find_several(keys: List[strax.storage.common.DataKey], **kwargs)[source]
Return list with backend keys or False for several data keys.
Options are as for find()
- hosts = {'dali': '^dali.*rcc.*'}
- provide_run_metadata = True