diff options
-rw-r--r-- | src/partialator.c | 19 | ||||
-rw-r--r-- | src/process_hkl.c | 25 | ||||
-rwxr-xr-x | tests/partialator_merge_check_1 | 13 | ||||
-rwxr-xr-x | tests/partialator_merge_check_2 | 13 | ||||
-rwxr-xr-x | tests/partialator_merge_check_3 | 13 | ||||
-rwxr-xr-x | tests/process_hkl_check_1 | 13 | ||||
-rwxr-xr-x | tests/process_hkl_check_2 | 13 | ||||
-rwxr-xr-x | tests/process_hkl_check_3 | 13 | ||||
-rwxr-xr-x | tests/process_hkl_check_4 | 13 |
9 files changed, 129 insertions, 6 deletions
diff --git a/src/partialator.c b/src/partialator.c index a9930d9e..1f87e6b8 100644 --- a/src/partialator.c +++ b/src/partialator.c @@ -945,6 +945,8 @@ int main(int argc, char *argv[]) PartialityModel pmodel = PMODEL_XSPHERE; int min_measurements = 2; char *rval; + const char *geom_str; + DataTemplate *dtempl; struct polarisation polarisation = {.fraction = 1.0, .angle = 0.0, .disable = 0}; @@ -1217,6 +1219,19 @@ int main(int argc, char *argv[]) return 1; } + geom_str = stream_geometry_file(st); + if ( geom_str == NULL ) { + ERROR("No geometry file\n"); + stream_close(st); + return 1; + } + + dtempl = data_template_new_from_string(geom_str); + if ( dtempl == NULL ) { + stream_close(st); + return 1; + } + if ( outfile == NULL ) { outfile = strdup("partialator.hkl"); } @@ -1375,8 +1390,8 @@ int main(int argc, char *argv[]) RefList *as; int i; - image = stream_read_chunk(st, NULL, STREAM_REFLECTIONS - | STREAM_UNITCELL); + image = stream_read_chunk(st, dtempl, STREAM_REFLECTIONS + | STREAM_UNITCELL); if ( image == NULL ) break; if ( isnan(image->div) || isnan(image->bw) ) { diff --git a/src/process_hkl.c b/src/process_hkl.c index 4fe1dbeb..b840f4ce 100644 --- a/src/process_hkl.c +++ b/src/process_hkl.c @@ -395,7 +395,8 @@ static void display_progress(int n_images, int n_crystals, int n_crystals_used) } -static int merge_all(Stream *st, RefList *model, RefList *reference, +static int merge_all(Stream *st, DataTemplate *dtempl, + RefList *model, RefList *reference, const SymOpList *sym, double **hist_vals, signed int hist_h, signed int hist_k, signed int hist_l, @@ -428,7 +429,7 @@ static int merge_all(Stream *st, RefList *model, RefList *reference, int i; /* Get data from next chunk */ - image = stream_read_chunk(st, NULL, + image = stream_read_chunk(st, dtempl, STREAM_REFLECTIONS | STREAM_UNITCELL); if ( image == NULL ) break; @@ -514,6 +515,8 @@ int main(int argc, char *argv[]) int hist_i; int space_for_hist = 0; char *histo_params = NULL; + const char *geom_str; + DataTemplate *dtempl; struct polarisation polarisation = {.fraction = 1.0, .angle = 0.0, .disable = 0}; @@ -723,6 +726,19 @@ int main(int argc, char *argv[]) return 1; } + geom_str = stream_geometry_file(st); + if ( geom_str == NULL ) { + ERROR("No geometry file found in stream\n"); + stream_close(st); + return 1; + } + + dtempl = data_template_new_from_string(geom_str); + if ( dtempl == NULL ) { + stream_close(st); + return 1; + } + model = reflist_new(); if ( histo != NULL ) { @@ -779,7 +795,8 @@ int main(int argc, char *argv[]) if ( config_scale ) twopass = 1; hist_i = 0; - r = merge_all(st, model, NULL, sym, &hist_vals, hist_h, hist_k, hist_l, + r = merge_all(st, dtempl, model, NULL, sym, + &hist_vals, hist_h, hist_k, hist_l, &hist_i, polarisation, min_measurements, min_snr, max_adu, start_after, stop_after, min_res, push_res, min_cc, config_scale, flag_even_odd, stat_output); @@ -813,7 +830,7 @@ int main(int argc, char *argv[]) hist_i = 0; } - r = merge_all(st, model, reference, sym, &hist_vals, + r = merge_all(st, dtempl, model, reference, sym, &hist_vals, hist_h, hist_k, hist_l, &hist_i, polarisation, min_measurements, min_snr, max_adu, start_after, stop_after, min_res, diff --git a/tests/partialator_merge_check_1 b/tests/partialator_merge_check_1 index 616ccf31..2d4391ef 100755 --- a/tests/partialator_merge_check_1 +++ b/tests/partialator_merge_check_1 @@ -5,6 +5,19 @@ PARTIALATOR=$1 cat > partialator_merge_check_1.stream << EOF CrystFEL stream format 2.1 Command line: indexamajig -i dummy.lst -o dummy.stream --kraken=prawn +----- Begin geometry file ----- +photon_energy = 9000 eV +panel/min_fs = 0 +panel/min_ss = 0 +panel/max_fs = 1023 +panel/max_ss = 1023 +panel/corner_x = -100 +panel/corner_y = -100 +panel/clen = 50 mm +panel/res = 1000000 +panel/adu_per_photon = 1 +panel/data = /data/data_array +----- End geometry file ----- ----- Begin chunk ----- Image filename: dummy.h5 photon_energy_eV = 6000.0 diff --git a/tests/partialator_merge_check_2 b/tests/partialator_merge_check_2 index 9938f64f..73c5873e 100755 --- a/tests/partialator_merge_check_2 +++ b/tests/partialator_merge_check_2 @@ -5,6 +5,19 @@ PARTIALATOR=$1 cat > partialator_merge_check_2.stream << EOF CrystFEL stream format 2.1 Command line: indexamajig -i dummy.lst -o dummy.stream --kraken=prawn +----- Begin geometry file ----- +photon_energy = 9000 eV +panel/min_fs = 0 +panel/min_ss = 0 +panel/max_fs = 1023 +panel/max_ss = 1023 +panel/corner_x = -100 +panel/corner_y = -100 +panel/clen = 50 mm +panel/res = 1000000 +panel/adu_per_photon = 1 +panel/data = /data/data_array +----- End geometry file ----- ----- Begin chunk ----- Image filename: dummy.h5 photon_energy_eV = 6000.0 diff --git a/tests/partialator_merge_check_3 b/tests/partialator_merge_check_3 index 2d237b02..6cb50980 100755 --- a/tests/partialator_merge_check_3 +++ b/tests/partialator_merge_check_3 @@ -5,6 +5,19 @@ PARTIALATOR=$1 cat > partialator_merge_check_3.stream << EOF CrystFEL stream format 2.1 Command line: indexamajig -i dummy.lst -o dummy.stream --kraken=prawn +----- Begin geometry file ----- +photon_energy = 9000 eV +panel/min_fs = 0 +panel/min_ss = 0 +panel/max_fs = 1023 +panel/max_ss = 1023 +panel/corner_x = -100 +panel/corner_y = -100 +panel/clen = 50 mm +panel/res = 1000000 +panel/adu_per_photon = 1 +panel/data = /data/data_array +----- End geometry file ----- ----- Begin chunk ----- Image filename: dummy.h5 photon_energy_eV = 6000.0 diff --git a/tests/process_hkl_check_1 b/tests/process_hkl_check_1 index 2d65c0a9..8496041d 100755 --- a/tests/process_hkl_check_1 +++ b/tests/process_hkl_check_1 @@ -5,6 +5,19 @@ PROCESS_HKL=$1 cat > process_hkl_check_1.stream << EOF CrystFEL stream format 2.1 Command line: indexamajig -i dummy.lst -o dummy.stream --kraken=prawn +----- Begin geometry file ----- +photon_energy = 9000 eV +panel/min_fs = 0 +panel/min_ss = 0 +panel/max_fs = 1023 +panel/max_ss = 1023 +panel/corner_x = -100 +panel/corner_y = -100 +panel/clen = 50 mm +panel/res = 1000000 +panel/adu_per_photon = 1 +panel/data = /data/data_array +----- End geometry file ----- ----- Begin chunk ----- Image filename: dummy.h5 photon_energy_eV = 2000.0 diff --git a/tests/process_hkl_check_2 b/tests/process_hkl_check_2 index b4d85fb4..2dec8840 100755 --- a/tests/process_hkl_check_2 +++ b/tests/process_hkl_check_2 @@ -5,6 +5,19 @@ PROCESS_HKL=$1 cat > process_hkl_check_2.stream << EOF CrystFEL stream format 2.1 Command line: indexamajig -i dummy.lst -o dummy.stream --kraken=prawn +----- Begin geometry file ----- +photon_energy = 9000 eV +panel/min_fs = 0 +panel/min_ss = 0 +panel/max_fs = 1023 +panel/max_ss = 1023 +panel/corner_x = -100 +panel/corner_y = -100 +panel/clen = 50 mm +panel/res = 1000000 +panel/adu_per_photon = 1 +panel/data = /data/data_array +----- End geometry file ----- ----- Begin chunk ----- Image filename: dummy.h5 photon_energy_eV = 2000.0 diff --git a/tests/process_hkl_check_3 b/tests/process_hkl_check_3 index cef7996c..763f6e87 100755 --- a/tests/process_hkl_check_3 +++ b/tests/process_hkl_check_3 @@ -5,6 +5,19 @@ PROCESS_HKL=$1 cat > process_hkl_check_3.stream << EOF CrystFEL stream format 2.1 Command line: indexamajig -i dummy.lst -o dummy.stream --kraken=prawn +----- Begin geometry file ----- +photon_energy = 9000 eV +panel/min_fs = 0 +panel/min_ss = 0 +panel/max_fs = 1023 +panel/max_ss = 1023 +panel/corner_x = -100 +panel/corner_y = -100 +panel/clen = 50 mm +panel/res = 1000000 +panel/adu_per_photon = 1 +panel/data = /data/data_array +----- End geometry file ----- ----- Begin chunk ----- Image filename: dummy.h5 photon_energy_eV = 2000.0 diff --git a/tests/process_hkl_check_4 b/tests/process_hkl_check_4 index aa36f112..1b267cf9 100755 --- a/tests/process_hkl_check_4 +++ b/tests/process_hkl_check_4 @@ -5,6 +5,19 @@ PROCESS_HKL=$1 cat > process_hkl_check_4.stream << EOF CrystFEL stream format 2.1 Command line: indexamajig -i dummy.lst -o dummy.stream --kraken=prawn +----- Begin geometry file ----- +photon_energy = 9000 eV +panel/min_fs = 0 +panel/min_ss = 0 +panel/max_fs = 1023 +panel/max_ss = 1023 +panel/corner_x = -100 +panel/corner_y = -100 +panel/clen = 50 mm +panel/res = 1000000 +panel/adu_per_photon = 1 +panel/data = /data/data_array +----- End geometry file ----- ----- Begin chunk ----- Image filename: dummy.h5 photon_energy_eV = 2000.0 |