Closed JossWhittle closed 4 years ago
The __main__
code path in field_generator.py
is not used in the current user directions for the software and is a good candidate to be removed entirely as this functionality is now present in other scripts and was originally hard coded for use on DLS beamline I21.
Closed by #57
Specifically in
field_generator.py
the magnet direction field in the output file is the sum of the magnets direction matrix at indices['direction_matrix'][0][0]
and['direction_matrix'][0][1]
. https://github.com/DiamondLightSource/Opt-ID/blob/5eae8f15642c98cf762d889715f960801f36258e/IDSort/src/field_generator.py#L301-L345While in
process_genome.py
the value is['direction_matrix'][1][1]
if the magnet type is1
or3
, otherwise it is['direction_matrix'][2][2]
if the magnet type is2
or4
. https://github.com/DiamondLightSource/Opt-ID/blob/5eae8f15642c98cf762d889715f960801f36258e/IDSort/src/process_genome.py#L129-L178field_generator.py
always creates a hard coded file for DLS beamline I21 namedI21_setmag.inp
so it is possible the code there is only for testing and can be removed safely.@markbasham Is the
I21_setmag.inp
file creation infield_generator.py
important / needed ?