MythenFileReader¶
File reader to read mythen hdf5 files written by Epics.
The EpicsMythenFileReader inherits from a wrapper class based on the C++ API of the HDF5 C Library. The provided dataset need to have fields data storing the photon counts,
DetectorAngle storing the detector position in degrees and CounterMask storing which counters are active. The field CounterMask stores an integer representation of a 3-digit bit string, where each bit is set to 1 if the counter is active.
Example¶
CounterMask: 4 // binary representation 1 0 0
only channel 0 is active
CounterMask: 3 // binary representation 0 1 1
channel 1 and 2 are active
- class angcal._angcal.EpicsMythenFileReader¶
Bases:
pybind11_object- __init__(self: angcal._angcal.EpicsMythenFileReader, fname: os.PathLike, incident_intensities_filename: os.PathLike | None = None) None¶
- base_name(self: angcal._angcal.EpicsMythenFileReader) str¶
return the base name of the series of files
- bytes_per_frame(self: angcal._angcal.EpicsMythenFileReader) int¶
return the number of bytes per frame
- current_file(self: angcal._angcal.EpicsMythenFileReader) os.PathLike¶
return the path of the current file in the series
- n_files(self: angcal._angcal.EpicsMythenFileReader) int¶
return the number of files in the series
- pixels_per_frame(self: angcal._angcal.EpicsMythenFileReader) int¶
return the number of pixels per frame
- read_detector_angle(self: angcal._angcal.EpicsMythenFileReader, frame_index: int) float¶
read detector angle from file at the given frame index. (does not advance the current frame index)
- read_frame(*args, **kwargs)¶
Overloaded function.
read_frame(self: angcal._angcal.EpicsMythenFileReader, frame_index: int) -> tuple[angcal._angcal.EpicsMythenHeader, angcal._angcal.MythenFrame]
read a MythenFrame from file at the given frame index (current frame index advances to the next frame).
- read_header(self: angcal._angcal.EpicsMythenFileReader, frame_index: int) angcal._angcal.EpicsMythenHeader¶
read header from file at the given frame index. (does not advance the current frame index)
- read_incident_intensity(self: angcal._angcal.EpicsMythenFileReader, frame_index: int) int¶
read incident intensity from file at the given frame index. (does not advance the current frame index)
- read_n(self: angcal._angcal.EpicsMythenFileReader, n_frames: int) tuple[numpy.ndarray, numpy.ndarray]¶
read n MythenFrames from file starting at the current frame index (current frame index advances to the next frame).
- seek(self: angcal._angcal.EpicsMythenFileReader, frame_index: int) None¶
seek to the given frame index (index over all files of the series)
- tell(self: angcal._angcal.EpicsMythenFileReader) int¶
tell the current frame index (index over all files of the series)
- total_frames(self: angcal._angcal.EpicsMythenFileReader) int¶
return the total number of frames in the series of files
MythenFrame¶
- class angcal._angcal.MythenFrame¶
MythenHeader¶
- class angcal._angcal.EpicsMythenHeader¶