Age | Commit message (Collapse) | Author |
|
We noticed that constant freeing and re-allocating the (potentially
quite large) arrays resulted in much lower performance. Since we know
that all images have the same data layout, we can safely re-use the
arrays. This gives a large speedup.
|
|
The saturation array is created by create_satmap when needed, which
takes care that all panels get an array (so we only have to check
image->sat != NULL). The array created by image_create_dp_bad_sat was
actually leaked!
In any case, saturation maps are rarely used. We can do without the
extra allocations.
The routine name has been changed accordingly, to prevent future
confusion.
|
|
This also improves is_hdf5_file() to use the proper file signature, not
just the extension. See 9040220452a9cc02706159c21c78e43b374446cf.
|
|
This code isn't needed any more, now that we don't simulate images. It
never worked very well - although we can read almost any sensible
format, writing images that match an arbitrary schema is very difficult.
See 41ed47a931e4c162c9a501981b6f19cd725f6e43 and https://gitlab.desy.de/thomas.white/crystfel/-/issues/81
|
|
It seems to make more sense here, because it's all about interpreting
the contents of the DataTemplate structure.
|
|
This adds a central procedure (image_create_dp_bad_sat) to create all
the arrays. Then it's up to the loading procedure to put the values
into the arrays.
This also makes the loading procedures responsible for marking NaN/inf
pixels in the bad pixel map. This avoids an additional sweep through
the image data, and makes it possible to skip the NaN/inf check
altogether if the image data comes, as it often does, in format which
can't represent NaN/inf anyway.
Finally, it removes quite a lot of duplicated code.
|
|
|
|
|
|
|
|
|
|
|
|
On some systems, this conflicts with DST_NONE in sys/time.h.
|
|
|
|
This clears up multiple layering violations which were starting to get
in the way. It enables "string" headers to be stored directly, and it
will make it much simpler to add new header types in the future.
Along the way, this changes all the floating point header stuff to use
double precision. This is needed for EuXFEL event IDs.
Closes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/34
|
|
The unique filename is needed by the GUI for looking up results in a
stream. Otherwise, the filename is "(null)" for everything and the
lookup just returns the first chunk in the stream.
The filename is generated based on the unique serial number for each
chunk, and is therefore unique across one run of indexamajig regardless
of the number of worker processes (-j). This might have to change in future
to accommodate jobs run across multiple nodes, if there is any demand
for looking at results in one big concatenated stream.
This also changes the condition for deciding when to look for a 'real'
file, to take into account that there is always a non-NULL filename.
|
|
This moves the entry point for loading MsgPack data to a new function,
image_read_data_block. Inside image.c, the image structure can be
created using exactly the same functions as for data files.
|
|
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.
|
|
|
|
These needed to be kept up to date with a call to map_all_peaks every
time anything changed - wavelength, detector position etc. Not doing so
has already led to bugs in another branch, and probably already causes
problems on this branch.
This patch eliminates the rx,ry,rz completely. Anyone who needs
reciprocal space coordinates for a peak is now responsible for calling
detgeom_transform_coords themselves.
|
|
Not needed since f5b3c4db36fa.
|
|
Horrible API hack.
|
|
This is a one-to-one transfer of the old hdf5_write_image()
|
|
...and factorise common code
|
|
Same reason as removing them from tests. Also, libcrystfel might be
used in projects which have HAVE_CONFIG_H defined.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Note the nicer separation: ZMQ is in indexamajig only, whereas
MessagePack becomes something generally accessible through libcrystfel.
|
|
|
|
record_image has been moved to pattern_sim.c
|
|
Not used anywhere!
|
|
The only place this is used is in geoptimiser, to get the
average_camera_length, itself a very bad solution.
|
|
|
|
|
|
Automatically detects file type, including HDF5 vs CXI
|
|
It's not used anywhere, and removing it means that the image structure
is no longer needed to search peaks
|
|
|
|
This makes the conversion to DataTemplate/detgeom MUCH easier.
|
|
|
|
|
|
|
|
|
|
|
|
These values were inconsistently set by different parts of the code,
e.g. different peak search methods. num_saturated_peaks was even set
during final integration. Now, the peak count is taken from the
ImageFeatureList, so it's authoritative.
|
|
|
|
|