diff options
author | Thomas White <taw@physics.org> | 2023-06-03 20:27:07 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2023-06-03 20:27:07 +0200 |
commit | c4271d8171f2f1f0a58ae47ba77dc96136450687 (patch) | |
tree | 1432bc1750b52b46f9955a14413187999d88d85a | |
parent | 50bb229a0b23f89c3a1fa265f42bdabbf2f452fc (diff) |
Support Seedee format f8<
-rw-r--r-- | libcrystfel/src/image-seedee.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libcrystfel/src/image-seedee.c b/libcrystfel/src/image-seedee.c index ae52c3f9..b4ae5179 100644 --- a/libcrystfel/src/image-seedee.c +++ b/libcrystfel/src/image-seedee.c @@ -98,6 +98,20 @@ static int load_seedee_data(struct panel_template *p, } } + } else if ( (array->datatype == 'f') + && (array->itemsize == 8) + && (array->byteorder == '<') ) + { + int fs, ss; + double *in_data = (double *)array->data; + + for ( ss=0; ss<PANEL_HEIGHT(p); ss++ ) { + for ( fs=0; fs<PANEL_WIDTH(p); fs++ ) { + size_t idx = fs+p->orig_min_fs + (ss+p->orig_min_ss)*data_size_fs; + data[fs+ss*PANEL_WIDTH(p)] = in_data[idx]; + } + } + } else { ERROR("Unrecognised data type %c%i%c\n", array->datatype, array->itemsize, array->byteorder); |