Commit a7265190 authored by Zhang, Yuanpeng's avatar Zhang, Yuanpeng
Browse files

fix the diagnostics routine

parent c413e59d
Loading
Loading
Loading
Loading
(708 KiB)

File changed.

No diff preview for this file type.

+12 −6
Original line number Diff line number Diff line
@@ -21,27 +21,33 @@
    "Diagnostics": {
        "PAC": {
            "NumMasks": [3790, 200],
            "NumBadUnmasked": 50
            "NumBadUnmasked": 30,
            "NumOutliers": 5
        },
        "MAG": {
            "NumMasks": [10400, 250],
            "NumBadUnmasked": 300
            "NumBadUnmasked": 300,
            "NumOutliers": 20
        },
        "OC": {
            "NumMasks": [4340, 200],
            "NumBadUnmasked": 50
            "NumBadUnmasked": 50,
            "NumOutliers": 20
        },
        "MICAS": {
            "NumMasks": [3250, 200],
            "NumBadUnmasked": 350
            "NumBadUnmasked": 350,
            "NumOutliers": 20
        },
        "LTJANIS": {
            "NumMasks": [4050, 200],
            "NumBadUnmasked": 50
            "NumBadUnmasked": 50,
            "NumOutliers": 20
        },
        "JANISGAS": {
            "NumMasks": [3600, 200],
            "NumBadUnmasked": 30
            "NumBadUnmasked": 30,
            "NumOutliers": 20
        }
    }
}

utils/PG3_62140_rel_offset.dat

deleted100644 → 0
+0 −43120

File deleted.

Preview size limit exceeded, changes collapsed.

+9 −3
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ def plot_diagnostics(run_num, out_dir, num_masks, bad_diag_input, good_diag_inpu
            _Q1 = np.percentile(_unmasked, 5)
            _Q3 = np.percentile(_unmasked, 95)
            _IQR = _Q3 - _Q1
            num_outliers = int(np.sum((_unmasked > _Q3 + 1.5 * _IQR) | (_unmasked < _Q1 - 1.5 * _IQR)))
            num_outliers = int(np.sum((_unmasked > _Q3 + 1.2 * _IQR) | (_unmasked < _Q1 - 1.2 * _IQR)))

    # Build color palette: one color per unique nominal d-spacing group
    _outlier_count = len(outlier_pixel_indices) if outlier_pixel_indices else 0
@@ -417,6 +417,11 @@ def pg3_calib_doctor(run_num, cal_file, manual_mask, out_dir, diag_dict):
        OutputWorkspace="pg3_wksp_d",
        Target="dSpacing"
    )
    Rebin(
        InputWorkspace="pg3_wksp_d",
        OutputWorkspace="pg3_wksp_d",
        Params="0,0.002,3.0"
    )
    LoadMask(
        Instrument="PG3",
        InputFile=manual_mask,
@@ -428,10 +433,11 @@ def pg3_calib_doctor(run_num, cal_file, manual_mask, out_dir, diag_dict):
        [[15000, 19580], [0.62, 0.65], [0.6307, 0]],
        [[19580, 25000], [0.66, 0.71], [0.6867, 0]],
        [[25000, 29057], [1.00, 1.15], [1.0758, 0]],
        [[29057, 30184], [1.80, 2.30], [2.0600, 0]],
        [[29057, 30184], [2.04, 2.09], [2.0600, 0]],
        [[30184, 33431], [0.47, 0.49], [0.4768, 0]],
        [[33431, 35567], [0.55, 0.58], [0.5642, 0]],
        [[35567, 39000], [0.66, 0.71], [0.6867, 0]],
        [[35567, 38500], [0.66, 0.71], [0.6867, 0]],
        [[38500, 39000], [1.07, 1.09], [1.0758, 0]],
        [[39000, 43120], [1.25, 1.275], [1.2615, 0]]
    ]