aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-06-02 14:19:25 +0200
committerThomas White <taw@physics.org>2010-06-02 14:19:25 +0200
commit58b6ae91c195b88604373dfb61c54b49ab6e3ddb (patch)
treed654e420233f9835c054e9e5e4b1667483966f89 /src
parent09336f631b1e420ccf8809413e7811092d509724 (diff)
Bad pixel mask is actually 16 bits
Diffstat (limited to 'src')
-rw-r--r--src/hdf5-file.c6
-rw-r--r--src/image.h2
-rw-r--r--src/peaks.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/hdf5-file.c b/src/hdf5-file.c
index d635923d..f83c047c 100644
--- a/src/hdf5-file.c
+++ b/src/hdf5-file.c
@@ -318,7 +318,7 @@ int hdf5_read(struct hdfile *f, struct image *image)
{
herr_t r;
float *buf;
- uint8_t *flags;
+ uint16_t *flags;
hid_t mask_dh;
image->height = f->nx;
@@ -338,8 +338,8 @@ int hdf5_read(struct hdfile *f, struct image *image)
if ( mask_dh <= 0 ) {
ERROR("Couldn't open flags\n");
} else {
- flags = malloc(sizeof(uint8_t)*f->nx*f->ny);
- r = H5Dread(mask_dh, H5T_NATIVE_B8, H5S_ALL, H5S_ALL,
+ flags = malloc(sizeof(uint16_t)*f->nx*f->ny);
+ r = H5Dread(mask_dh, H5T_NATIVE_B16, H5S_ALL, H5S_ALL,
H5P_DEFAULT, flags);
if ( r < 0 ) {
ERROR("Couldn't read flags\n");
diff --git a/src/image.h b/src/image.h
index e3a520ca..0ca16745 100644
--- a/src/image.h
+++ b/src/image.h
@@ -81,7 +81,7 @@ struct reflhit {
struct image {
float *data;
- uint8_t *flags;
+ uint16_t *flags;
double *twotheta;
UnitCell *indexed_cell;
UnitCell *candidate_cells[MAX_CELL_CANDIDATES];
diff --git a/src/peaks.c b/src/peaks.c
index 6e8490ff..baa960b1 100644
--- a/src/peaks.c
+++ b/src/peaks.c
@@ -152,7 +152,7 @@ static int integrate_peak(struct image *image, int xp, int yp,
double val, sa, pix_area, Lsq, dsq, proj_area;
float tt;
double phi, pa, pb, pol;
- uint8_t flags;
+ uint16_t flags;
/* Circular mask */
if ( x*x + y*y > lim ) continue;