Skip to content

Refactor image binning code #6

@benjaminhwilliams

Description

@benjaminhwilliams

Based on what we have learned since recent data collections on I19, the script for creating binned images from raw event mode data needs a little rationalisation and tidying.

  • Rename timepix2M.py to the more descriptive make_images.py.
  • Read from raw files, using the time slice enumerations ts_rank_nn from the meta.h5 file as a guide, reading as many time slices at a time as memory constraints allow and iterating over the entire meta.h5 file to bin all the data. This obviates the need to hold all the raw data in memory at once. We can exploit the fact that time slices do not overlap.
  • Process separate detector modules independently, to reduce complexity of the histogramming in (x, y), and in parallel, to gain an overall speed boost.
  • Unify the user interface with time_histogram.py to some extent.
  • Create a time scan data set in the finished file, recording the time in seconds of the start of each exposure, akin to the axis scan data set, which records the angular starting position of each image. As per time_histogram.py, if one or more external trigger signals is present, the first should be used to define the zero time. This will allow downstream synchronisation and aggregation of multiple image data sets for improved statistics.

I am working on this at the moment and have made a start in the branch make-images-refactor.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions