Skip to content
Snippets Groups Projects

Includes input energy parameter in the model and adds non-linearities

Merged Danilo Enoque Ferreira de Lima requested to merge with_energy into main
Files
3
@@ -144,6 +144,7 @@ def main():
parser.add_argument('-o', '--offset', type=int, metavar='INT', default=0, help='Train ID offset')
parser.add_argument('-c', '--xgm_cut', type=float, metavar='INTENSITY', default=500, help='XGM intensity threshold in uJ.')
parser.add_argument('-e', '--poly', action="store_true", default=False, help='Wheteher to expand PES data in higher order polynomials.')
parser.add_argument('-w', '--weight', action="store_true", default=False, help='Whether to reweight data as a function of the pulse energy to make it invariant to that.')
args = parser.parse_args()
@@ -245,6 +246,8 @@ def main():
print("Fitting")
start = time_ns()
w = model.uniformize(xgm_flux[train_idx])
if not args.weight:
w[...] = 1.0
print("w", np.amin(w), np.amax(w), np.median(w))
model.fit(pes_raw,
#{k: v[train_idx]
Loading