slac-lcls / smalldata_tools

code to facilitate production of LCLS small data files and the analysis thereof
12 stars 11 forks source link

ROI and Projection test #161

Closed z840561410 closed 1 year ago

z840561410 commented 1 year ago

Description

Enhanced JungFrau detector tests by adding tests for ROI, Projection, and ROI_Projection functions. Additionally, improved the code in the process function of ProjectionFunc class in roi_rebin.py by removing irrelevant code and fixing the check for masked array variables meanRes/sunRes.

Motivation and Context

The purpose of these tests is to verify the functionality of the ROI, Projection, and ROI_Projection functions by examining their outputs (number, data type, and shape) for different inputs using fixture.

How Has This Been Tested?

This is tested with various input combinations.

Where Has This Been Documented?

some inline comments

vespos commented 1 year ago

I have added a couple things:

Something that I would like you to do: add a bit more info to the log message. Like iinstead of just saying "Correct type" say smth like "Correct data type for ROI_area, ROI_com, ...". This way we know a bit more about what is happening.