Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cycle 23/3 fixes and new features for 23/4 #3

Merged
merged 9 commits into from
Nov 12, 2023
Merged

Cycle 23/3 fixes and new features for 23/4 #3

merged 9 commits into from
Nov 12, 2023

Conversation

mducle
Copy link
Member

@mducle mducle commented Nov 10, 2023

Various bugfixes identified during cycle 23/3:

  • Rebinning in energy now uses the Ei defined in Ei_list by user instead of the Ei found by GetEi - this ensures that files with the same nominal Ei can be subtracted
  • Fixed name error when whitevan is a list (for summed white-vans)
  • Remove extraneous events logs in output nxs to reduce file size (is now comparable to nxspe in size for powders - around 2-3MB).
  • Reduce memory use by removing temporary workspaces (ws_norm, ws_corrected, ws_out) which are essentially clones/copies of the full event workspace. For each rep a single temporary workspace (ws_rep) is created by cropping to the relevant ToF region (defined by Erange) and operated upon.
  • Add routines specifically for MARI to handle high background at high angles due to shielding mechanical failure affecting cycles 23/3 and 23/4 (at least).

New features implemented for cycle 23/4:

  • Automatic Ei determination from chopper phases. Now users can set Ei_list = 'auto' to use the auto-Ei feature.
  • Continous scans: If given a single run or a list with sumruns=True will split this into multiple reduced files based on a log block value (e.g. split into different angles for Horace or temperatures, fields, etc. in a sweep). Enabled by setting cs_block to the name of a valid log block, and cs_bin_size to non-zero. Must have same_angle_action='ignore'.
  • iliad function driver for people who don't want to run through the file. This is used as follows:
from reduction_utils import iliad
iliad(runno=28581, ei='auto', wbvan=28580)

This actually uses the DG_* scripts in the same directory (presumably the user's RB folder) so if you've changed anything in those files, they will be used by the iliad function. As iliad reads the DG_* script there are now markers #!begin_params and #!end_params which must be kept in the file to let iliad know what are parameters. It will use the values in the DG_* files as default but you can override any parameter by specifying it as a keyword argument to iliad. The exceptions are:

  • runno is used instead of sample
  • ei is used instead of Ei_list
  • wbvan is used instead of whitevan
  • sam_mass is used instead of sample_mass
  • sam_rmm is used instead of sample_fwt

This is to ensure compatibility with the old iliad scripts. In addition the old parameters hard_mask_file and sum_runs will be recognised and interpreted as mask and sumruns in the new scripts.

@mducle mducle force-pushed the cycle_23_3 branch 3 times, most recently from d68f050 to d10389a Compare November 11, 2023 02:44
@mducle mducle force-pushed the cycle_23_3 branch 2 times, most recently from e68a3c7 to cd9ac89 Compare November 12, 2023 16:28
@mducle mducle merged commit cca5285 into main Nov 12, 2023
1 check passed
@mducle mducle deleted the cycle_23_3 branch November 23, 2023 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant