-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ggggggggg/ebit_cal
Ebit cal
- Loading branch information
Showing
11 changed files
with
698 additions
and
469 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import polars as pl | ||
import pylab as plt | ||
import numpy as np | ||
import marimo as mo | ||
import moss | ||
|
||
import mass | ||
import os | ||
massroot = os.path.split(os.path.split(mass.__file__)[0])[0] | ||
|
||
noise_folder = os.path.join(massroot,"tests","ljh_files","20230626","0000") | ||
pulse_folder = os.path.join(massroot,"tests","ljh_files","20230626","0001") | ||
data = moss.Channels.from_ljh_folder( | ||
pulse_folder=pulse_folder, noise_folder=noise_folder | ||
) | ||
data2 = data.transform_channels( | ||
lambda channel: channel.summarize_pulses() | ||
.with_good_expr_pretrig_mean_and_postpeak_deriv() | ||
.rough_cal( | ||
["MnKAlpha", "MnKBeta", "CuKAlpha", "CuKBeta", "PdLAlpha", "PdLBeta"], | ||
uncalibrated_col="peak_value", | ||
calibrated_col="energy_peak_value", | ||
ph_smoothing_fwhm=50, | ||
) | ||
.filter5lag(f_3db=10e3) | ||
.rough_cal( | ||
["MnKAlpha", "MnKBeta", "CuKAlpha", "CuKBeta", "PdLAlpha", "PdLBeta"], | ||
uncalibrated_col="5lagy", | ||
calibrated_col="energy_5lagy", | ||
ph_smoothing_fwhm=50, | ||
) | ||
.driftcorrect() | ||
.rough_cal( | ||
["MnKAlpha", "MnKBeta", "CuKAlpha", "CuKBeta", "PdLAlpha", "PdLBeta"], | ||
uncalibrated_col="5lagy_dc", | ||
calibrated_col="energy_5lagy_dc", | ||
ph_smoothing_fwhm=50, | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import marimo | ||
|
||
__generated_with = "0.7.11" | ||
app = marimo.App(width="medium") | ||
|
||
|
||
@app.cell | ||
def __(): | ||
raise Exception() | ||
return | ||
|
||
|
||
if __name__ == "__main__": | ||
app.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.