Age | Commit message (Collapse) | Author |
|
This was intended to help users avoid accidents. However, it seems to
trip people up a lot, and creates problems such as breaking Slurm job
pre-emption (re-scheduled job fails because output already exists).
This reverts commit 6db9619ba5172b9e416a5939d375f5119aa652ff.
|
|
The old maximum was 64 kilobytes, and a 68k geometry file has now been
seen in the wild. The limit is only needed to prevent runaway memory
allocation in the case of a corrupted stream. So it's safe to increase
it quite a lot.
|
|
It is horrible. But it's contained inside the DataTemplate module.
|
|
|
|
It seems to make more sense here, because it's all about interpreting
the contents of the DataTemplate structure.
|
|
This avoids e.g. crashing later if the geometry is bad.
This commit also removes a problematic stanza from the geometry in
test.stream, since the stream reading functions are now more fussy about
this.
|
|
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.
|
|
With online processing, we might end up with a very long stream. It
should not be so easily deleted if indexamajig is restarted!
|
|
|
|
This adds a new routine, data_template_slabby_file_to_panel_coords, to
be used (only!) in places where external forces require assumptions of
slabbiness: pixel maps and MsgPack/HDF5 peak lists (including
CXI-style).
This also fixes the prototype of data_template_file_to_panel_coords to
make the panel number strictly an input parameter. This was an
oversight in the implementation of DataTemplate, and caused problems
when reading non-slabby streams.
Fixes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/66
|
|
|
|
CrystFEL hasn't written any version other than 2.3 since before 2015.
Supporting the old versions is getting difficult because of slabbiness
assumptions, so it's time to get rid of it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
On some systems, this conflicts with DST_NONE in sys/time.h.
|
|
Rationale: Although the format has technically changed, CrystFEL 0.9.1
and older do not read the "hdf5/" lines anyway. The new "header" lines
are just noise, as far as they are concerned. However, increasing the
version number causes older CrystFEL versions to reject streams written
by newer CrystFEL versions. This is inconvenient, but will be a
particular problem since CrystFEL 0.10.0 will most likely be released
without a working "geoptimiser". We therefore need to be able to use
older CrystFEL versions for refining geometry. Older versions are
perfectly capable of reading newer streams.
In general, the semantics of stream version numbers are a bit messed up,
and we need to work out what they really mean.
This reverts commit fdce01adf9fc5950904b644ea755760cb32ec5b2.
|
|
The format for storing headers has changed from hdf5/location to
header/type/location.
|
|
The old way of recording metadata in the stream unfortunately doesn't
include any information about the data type. Most of the time, floating
point is what's intended. Older CrystFEL doesn't know about integer
headers at all, but there might be string values if --copy-hdf5-field
was used.
By interpreting "hdf5/something = val" as floating-point, most things
will work, e.g. camera length from HDF5 header enabling stream to be
loaded without access to the image data. Anything that can't be
interpreted as floating-point will be noisily ignored when loading the
stream.
|
|
|
|
|
|
Prompted by the article linked below, for each FIXME/TODO I've either
referenced an issue in the tracker, or removed it if it's not worth
fixing.
https://schleiss.io/plotting-source-code-todos-for-open-source-projects
|
|
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
|
|
This removes the big potential for confusion, which has happened several
times (see e.g. 095cbebaf6). It also fixes in-tree builds with CMake
(but seriously, always use out-of-tree builds).
Fixes #2.
|
|
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.
|
|
This allows the refined detector position to be used in a lot of places.
|
|
|
|
This solves a tricky conceptual issue: Stream owns the DataTemplate when
it's reading (because it came from the stream headers), but not when
writing (when it's provided to us).
|
|
|
|
|
|
It's not used any more - nowhere is it set to 1.
|
|
|
|
Previously, the "getter" functions would re-calculate the requested
representation every time they were called. This could mean doing a
matrix inversion in the middle of a tight loop, wasting loads of time.
Now, it stores the calculated values and returns them directly next
time. Setting the parameters invalidates the values for all
representations other than the one given.
The cost of doing this is that the cell can no longer be "const" in the
getter functions. This tracked through some other code, but nothing too
severe.
|
|
This is a hack, and should be replaced by something which gets the
metadata from the stream rather than hitting the read image file every
time.
|
|
Because it sounds strange and confusing to index the indexing results.
|
|
This wasn't present in the old version, and it was missing a space
anyway.
|
|
|
|
Event ID is not written if not needed
|
|
|
|
|
|
No longer needed, and didn't fit very well in the first place.
|
|
|
|
These flags weren't orthogonal at all, which was turning some routines
into spaghetti-code.
It's still possible to avoid read/write of peak lists, reflection data
or image data. But that's it.
|
|
|
|
It makes no sense for a different DataTemplate to be used for every
frame in a stream. And this way makes everything much easier for users
ot the API.
|
|
Also, this fixes some incorrect headers and adds --version flags to
programs which didn't yet have them.
|
|
|