Remove all simulation code
This is a proposal to completely remove all the simulation code (partial_sim
and pattern_sim
) from CrystFEL. The rationale is as follows.
-
The programs haven't had any new features added for over half a decade.
-
In multiple recent versions, it's been broken. This was the case in 0.10.0 and 0.10.1 for both programs (see c165bdde and 5d267fe6), and also for earlier versions.
-
The programs are not well-used, so no-one seemed to notice the breakage until much later. It was fixed, only to break again later.
-
There are better solutions for simulating patterns.
-
The close integration with CrystFEL geometry files is no longer very meaningful. With early (2009-2012) versions, one could use the same geometry file for simulation and processing. Nowadays, many complicated file formats are possible. It's very difficult to write a file that will be directly readable:
image_hdf5_write
is horribly complicated, used only by pattern_sim, and doesn't even work. -
The code in
pattern_sim
is completely separate and specific to that program. It even has its own reflection array structure. The program therefore doesn't benefit much from being part of the suite. -
The state of the art in data processing has reached a point where simulations aren't really needed any more. Even advanced algorithms nowadays have a good change of working on experimental data. Very clean experimental data is available where necessary.
-
The build system stuff needed to support OpenCL has caused difficulty for people. This led to its being disabled by default (see 5c31874f).
-
The
DataTemplate
paradigm (filename + opaque DataTemplate ---> image + transparent detgeom
) doesn't work very well for simulation. The necessary routine (image_create_for_simulation
) is often abused.
Someone wanting to simulate some patterns, these days, is honestly better off using a version of CrystFEL from about 2013. If simulation came back into demand, a new program, much simpler, could be written based on the old code, that writes only a specific file layout (suggestion: it could produce a geometry file as a side product).
Work in progress on branch big-cleanup. The immediate code reduction is nearly 6000 lines!