diff options
author | Thomas White <taw@physics.org> | 2021-03-09 15:09:46 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-03-09 15:09:46 +0100 |
commit | fb230df5c97b1a351db3d3aedbb90b59b8688651 (patch) | |
tree | 49927e97c843bb4d3764984852206338d95d6970 /libcrystfel/src/datatemplate_priv.h | |
parent | 1ac8c79dce60517bd72d7d15c6c45dc9a0db1378 (diff) |
Add the ability to use multiple bad pixel masks at once
Diffstat (limited to 'libcrystfel/src/datatemplate_priv.h')
-rw-r--r-- | libcrystfel/src/datatemplate_priv.h | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/libcrystfel/src/datatemplate_priv.h b/libcrystfel/src/datatemplate_priv.h index 60e8ead6..62911748 100644 --- a/libcrystfel/src/datatemplate_priv.h +++ b/libcrystfel/src/datatemplate_priv.h @@ -78,6 +78,28 @@ enum peak_layout #define DIM_UNDEFINED (-3) #define DIM_PLACEHOLDER (-4) + +/* Maximum number of masks per panel */ +#define MAX_MASKS (8) + +struct mask_template +{ + /** Location of mask data */ + char *data_location; + + /** Filename for mask data */ + char *filename; + + /** Bit mask for bad pixels + * (pixel is bad if any of these are set) */ + unsigned int bad_bits; + + /** Bit mask for good pixels + * (pixel cannot be good unless all of these are set) */ + unsigned int good_bits; +}; + + /** * Represents one panel of a detector */ @@ -98,11 +120,8 @@ struct panel_template /** The offset to be applied from \ref clen */ double cnz_offset; - /** Location of mask data */ - char *mask; - - /** Filename for mask data */ - char *mask_file; + /** Mask definitions */ + struct mask_template masks[MAX_MASKS]; /** Location of per-pixel saturation map */ char *satmap; @@ -201,9 +220,6 @@ struct _datatemplate double bandwidth; - unsigned int mask_bad; - unsigned int mask_good; - struct rigid_group **rigid_groups; int n_rigid_groups; |