diff options
author | Thomas White <taw@physics.org> | 2021-03-30 17:01:11 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-03-30 17:01:11 +0200 |
commit | 00f88dac5a2b63ec1c5f7ad65efef3d4f9d93b77 (patch) | |
tree | fc8a5f77c1b88f526cbdd7efb53b09183cc5ca14 /libcrystfel/src/datatemplate_priv.h | |
parent | ab2158fb3f8053c6277113b4fb22007859f53de8 (diff) |
Add header caching layer
This simultaneously implements --copy-header/--copy-hdf5-field and gives
access to metadata (e.g. detector position or wavelength) when loading
from a stream with header-specified values.
Diffstat (limited to 'libcrystfel/src/datatemplate_priv.h')
-rw-r--r-- | libcrystfel/src/datatemplate_priv.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libcrystfel/src/datatemplate_priv.h b/libcrystfel/src/datatemplate_priv.h index 71569273..9d9485bf 100644 --- a/libcrystfel/src/datatemplate_priv.h +++ b/libcrystfel/src/datatemplate_priv.h @@ -78,6 +78,9 @@ enum peak_layout #define DIM_UNDEFINED (-3) #define DIM_PLACEHOLDER (-4) +/* Maximum number of headers to cache, in addition to anything already + * referenced by the DataTemplate */ +#define MAX_COPY_HEADERS (32) /* Maximum number of masks per panel */ #define MAX_MASKS (8) @@ -232,6 +235,9 @@ struct _datatemplate /* Shift of whole detector, in m */ char *shift_x_from; char *shift_y_from; + + char *headers_to_copy[MAX_COPY_HEADERS]; + int n_headers_to_copy; }; extern double convert_to_m(double val, int units); |