Data file conversion

In general, it is expected that a CAMEA-like instrument is to be run during experiments in 2 different scan modes:

  • \(A3\) scans

  • External parameter

However, in the initial phase of set-up other scans might be conducted. The data conversion thus does not require a specific scan but allows for all types. This does then require the user to choose visualizations correspondingly.

HdF file format

The raw data from the instrument is expected to be provided in an HdF 5 format with the following structure:

cameasim2018n0000xx.h5
    └── entry
        ├── CAMEA
        │    ├── calib1
        │    │    ├── a4offset
        │    │    ├── amplitude
        │    │    ├── background
        │    │    ├── boundaries
        │    │    ├── final_energy
        │    │    └── width
        │    ├── calib3
        │    │    ├── a4offset
        │    │    ├── amplitude
        │    │    ├── background
        │    │    ├── boundaries
        │    │    ├── final_energy
        │    │    └── width
        │    ├── calib8
        │    │    ├── a4offset
        │    │    ├── amplitude
        │    │    ├── background
        │    │    ├── boundaries
        │    │    ├── final_energy
        │    │    └── width
        │    ├── detector
        │    │    ├── counts
        │    │    └── summed_counts
        │    ├── monochromator
        │    │    ├── d_spacing
        │    │    ├── energy
        │    │    ├── gm
        │    │    ├── gm_zero
        │    │    ├── horizontal_curvature
        │    │    ├── horizontal_curvature_zero
        │    │    ├── rotation_angle
        │    │    ├── rotation_angle_zero
        │    │    ├── summed_counts
        │    │    ├── tlm
        │    │    ├── tlm_zero
        │    │    ├── tum
        │    │    ├── tum_zero
        │    │    ├── type
        │    │    ├── vertical_curvature
        │    │    └── vertical_curvature_zero
        │    └── monochromator_slit
        │         ├── bottom
        │         ├── bottom_zero
        │         ├── left
        │         ├── left_zero
        │         ├── right
        │         ├── right_zero
        │         ├── top
        │         ├── top_zero
        │         ├── x_gab
        │         └── y_gab
        ├── comment
        ├── control
        │    ├── absolute_time
        │    ├── data
        │    ├── mode
        │    ├── preset
        │    └── time
        ├── data
        │    ├── counts
        │    ├── summed_counts
        │    └── (Scan parameter)
        ├── end_time
        ├── experimental_identifier
        ├── instrument
        ├── local_contact
        │    └── name
        ├── proposal_id
        ├── proposal_title
        ├── proposal_user
        │    └── name
        ├── proton_beam
        │    └── data
        ├── sample
        │    ├── azimuthal_angle
        │    ├── name
        │    ├── orientation_matrix
        │    ├── plane_normal
        │    ├── plane_vector_1
        │    ├── plane_vector_2
        │    ├── polar_angle
        │    ├── polar_angle_zero
        │    ├── rotation_angle
        │    ├── rotation_angle_zero
        │    ├── sgl
        │    ├── sgl_zero
        │    ├── sgu
        │    ├── sgu_zero
        │    ├── (sample environment parameters)
        │    └── unit_cell
        ├── scancommand
        ├── scanvars
        ├── start_time
        ├── title
        └── user
             ├── address
             ├── affiliation
             ├── email
             └── name

From this file, raw plotting and a conversion algorithm is possible.

NXsqom file format

The format into which data is converted is the NXsqom format. It is a standard of the nexus files and is designed for data converted into reciprocal space. With this choice of conversion it is believed that some pre-existing data handling routines exist in other software solutions already.

Below is a HDF converted file in the NXsqom format for a \(A3\) scan. Here \(NP\) is the number of scan points and \(NNP\) is the number of unique pixels converted.

cameasim2018n0000xx.nxs
    └── entry
        ├── CAMEA
        │    ├── calib1
        │    │    ├── a4offset
        │    │    ├── amplitude
        │    │    ├── background
        │    │    ├── boundaries
        │    │    ├── final_energy
        │    │    └── width
        │    ├── calib3
        │    │    ├── a4offset
        │    │    ├── amplitude
        │    │    ├── background
        │    │    ├── boundaries
        │    │    ├── final_energy
        │    │    └── width
        │    ├── calib8
        │    │    ├── a4offset
        │    │    ├── amplitude
        │    │    ├── background
        │    │    ├── boundaries
        │    │    ├── final_energy
        │    │    └── width
        │    ├── detector
        │    │    ├── counts
        │    │    └── summed_counts
        │    ├── monochromator
        │    │    ├── d_spacing
        │    │    ├── energy
        │    │    ├── gm
        │    │    ├── gm_zero
        │    │    ├── horizontal_curvature
        │    │    ├── horizontal_curvature_zero
        │    │    ├── rotation_angle
        │    │    ├── rotation_angle_zero
        │    │    ├── summed_counts
        │    │    ├── tlm
        │    │    ├── tlm_zero
        │    │    ├── tum
        │    │    ├── tum_zero
        │    │    ├── type
        │    │    ├── vertical_curvature
        │    │    └── vertical_curvature_zero
        │    └── monochromator_slit
        │         ├── bottom
        │         ├── bottom_zero
        │         ├── left
        │         ├── left_zero
        │         ├── right
        │         ├── right_zero
        │         ├── top
        │         ├── top_zero
        │         ├── x_gab
        │         └── y_gab
        ├── comment
        ├── control
        │    ├── absolute_time
        │    ├── data
        │    ├── mode
        │    ├── preset
        │    └── time
        ├── data
        │    ├── counts
        │    ├── en
        │    ├── monitor
        │    ├── normalization
        │    ├── qx
        │    ├── qy
        │    ├── summed_counts
        │    └── (Scan parameter)
        ├── end_time
        ├── experimental_identifier
        ├── instrument
        ├── local_contact
        │    └── name
        ├── proposal_id
        ├── proposal_title
        ├── proposal_user
        │    └── name
        ├── proton_beam
        │    └── data
        ├── sample
        │    ├── azimuthal_angle
        │    ├── name
        │    ├── orientation_matrix
        │    ├── plane_normal
        │    ├── plane_vector_1
        │    ├── plane_vector_2
        │    ├── polar_angle
        │    ├── polar_angle_zero
        │    ├── rotation_angle
        │    ├── rotation_angle_zero
        │    ├── sgl
        │    ├── sgl_zero
        │    ├── sgu
        │    ├── sgu_zero
        │    ├── (sample environment parameters)
        │    └── unit_cell
        ├── scancommand
        ├── scanvars
        ├── start_time
        ├── title
        └── user
             ├── address
             ├── affiliation
             ├── email
             └── name