Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PTR-MS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EBAS-DATA-PROCESSING
CiGas-processing-software
PTR-MS
Commits
0ec019cb
Commit
0ec019cb
authored
1 month ago
by
Marc-Antoine Drouin
Browse files
Options
Downloads
Patches
Plain Diff
fix: bug with background
- background cache was saved in both ptrms_lib and ptrms_lib interface
parent
67cb4410
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/algo/ptrms_lib
+1
-1
1 addition, 1 deletion
src/algo/ptrms_lib
src/algo/ptrms_lib.py
+11
-10
11 additions, 10 deletions
src/algo/ptrms_lib.py
tests/SIRTA/backgrounds/background_save.csv
+0
-2
0 additions, 2 deletions
tests/SIRTA/backgrounds/background_save.csv
with
12 additions
and
13 deletions
ptrms_lib
@
4789f4c1
Subproject commit
55d2d345381e0e290b483a734742abe069807deb
Subproject commit
4789f4c19fcc10741709922bf8555f630bc64a0a
This diff is collapsed.
Click to expand it.
src/algo/ptrms_lib.py
+
11
−
10
View file @
0ec019cb
...
...
@@ -105,13 +105,17 @@ class ptrms_lib:
# check if required info available to run code
# ------------------------------------------------------------------------------
# background
if
not
self
.
bck_save
.
exists
():
# if no cache background, we need to have blank in data
if
not
any
(
valve_data
[
"
meaning
"
]
==
"
BLANK
"
):
raise
RuntimeError
(
"
No background data and no blank data in file. Impossible to process file.
"
)
# if no cache background, and no blank in data
filter_blank
=
valve_data
[
"
meaning
"
]
==
"
BLANK
"
if
not
self
.
bck_save
.
exists
()
and
not
any
(
filter_blank
):
err_msg
=
"
No background data and no blank data in file. Impossible to process file.
"
# noqa: E501
raise
RuntimeError
(
err_msg
)
# we need several points for blanks
n_blanks
=
filter_blank
.
to_numpy
().
astype
(
int
).
sum
()
if
n_blanks
<
5
:
print
(
"
not enough blanks. using cache background.
"
)
# noqa: T201
ptrms_data_raw
=
ptrms_data_raw
[
~
filter_blank
]
# processing to NCPS
# ------------------------------------------------------------------------------
...
...
@@ -138,9 +142,6 @@ class ptrms_lib:
self
.
bck_save
,
)
# save background
bck_data
.
to_csv
(
self
.
bck_save
,
float_format
=
"
%.3f
"
)
# get calibration coefficients
# ---------------------------------------------------------------------------------
snorm_data
=
calib
.
get_snorm
(
...
...
This diff is collapsed.
Click to expand it.
tests/SIRTA/backgrounds/background_save.csv
deleted
100644 → 0
+
0
−
2
View file @
67cb4410
,mz_31,mz_33,mz_42,mz_45,mz_46,mz_47,mz_57,mz_58,mz_59,mz_60,mz_61,mz_63,mz_69,mz_71,mz_73,mz_75,mz_79,mz_81,mz_83,mz_85,mz_87,mz_93,mz_97,mz_99,mz_107,mz_111,mz_121,mz_137,mz_139,mz_147,mz_151
2024-10-27 07:51:42.998400,7.6538724142195615,85.57709228262395,2.8615273473538423,18.92359024792213,,15.472185099450392,4.54505711405783,,5.305653723246409,,4.466380472078328,3.6350229217922827,3.1977896748722894,2.944168743054741,5.723146722987975,3.2179723310173665,2.778793923372653,,,,,6.000334133495124,,,4.746597324858441,,3.2476780114529196,2.539520394617266,,,
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment