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
293593f9
Commit
293593f9
authored
1 month ago
by
Aurelien Chauvigne
Browse files
Options
Downloads
Patches
Plain Diff
add configuration file as requested argument
parent
5c7e7d9d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+2
-3
2 additions, 3 deletions
README.md
src/converter/PtrmsConverter.py
+9
-16
9 additions, 16 deletions
src/converter/PtrmsConverter.py
with
11 additions
and
19 deletions
README.md
+
2
−
3
View file @
293593f9
...
...
@@ -87,10 +87,11 @@ For concentration conversion, parameters are needed in algo/ptrms_lib/conf/conf_
```
* For a a list of files
Usage: python3 src/converter/PtrmsConverter.py [options] <infiles>
Usage: python3 src/converter/PtrmsConverter.py [options]
<conf-file>
<infiles>
Args:
<infiles> : list of files to process
<conf-file> : path of the configuration file
Options:
-h, --help show this help message and exit
...
...
@@ -98,8 +99,6 @@ Options:
Process only this product. All by default
-o OUT_DIR, --out_dir=OUT_DIR
force a specific output directory
-c CONF, --configuration-file=CONF
Full path of the configuration file
-d CACHE_DIR, --cache_dir=CACHE_DIR
Directory of the temporary files
...
...
This diff is collapsed.
Click to expand it.
src/converter/PtrmsConverter.py
+
9
−
16
View file @
293593f9
...
...
@@ -578,11 +578,12 @@ class PtrmsConverter(Converter.Converter):
"""
parser
=
OptionParser
()
parser
.
usage
=
"
python3
"
+
app
+
"
.py [options] <infiles>
"
+
os
.
linesep
parser
.
usage
=
"
python3
"
+
app
+
"
.py [options]
<conf-file>
<infiles>
"
+
os
.
linesep
parser
.
usage
+=
os
.
linesep
parser
.
usage
+=
"
with :
"
+
os
.
linesep
parser
.
usage
+=
(
"
\t
<infiles> full path to the trace gazes file(s) to convert
"
+
os
.
linesep
"
\t
<infiles> full path to the trace gazes file(s) to convert
"
+
os
.
linesep
+
"
\t
<conf-file> full path of the configuration file
"
+
os
.
linesep
)
parser
.
add_option
(
...
...
@@ -605,15 +606,6 @@ class PtrmsConverter(Converter.Converter):
help
=
"
Output directory
"
,
)
parser
.
add_option
(
"
-c
"
,
"
--configuration-file
"
,
action
=
"
store
"
,
type
=
"
str
"
,
dest
=
"
conf
"
,
help
=
"
Full path of the configuration file
"
,
)
parser
.
add_option
(
"
-d
"
,
"
--cache_dir
"
,
...
...
@@ -625,22 +617,23 @@ class PtrmsConverter(Converter.Converter):
)
infiles
=
[
sys
.
argv
[
-
1
]]
conf
=
sys
.
argv
[
-
2
]
# check the number of command line arguments
if
len
(
sys
.
argv
)
<
1
:
if
len
(
sys
.
argv
)
<
2
:
parser
.
print_help
()
raise
ValueError
(
"
Missing command-line
option
s
"
)
raise
ValueError
(
"
Missing command-line
argument
s
"
)
return
infiles
,
parser
.
parse_args
()
return
infiles
,
conf
,
parser
.
parse_args
()
def
main
():
SRC_DIR
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)),
"
..
"
,
"
..
"
)
infiles
,
(
options
,
arg
)
=
PtrmsConverter
.
get_parser
(
__APP__
,
SRC_DIR
)
infiles
,
conf
,
(
options
,
arg
)
=
PtrmsConverter
.
get_parser
(
__APP__
,
SRC_DIR
)
prog
=
PtrmsConverter
(
options
.
prod_id
)
prog
.
process
(
infiles
,
options
.
conf
,
options
.
cache_dir
,
options
.
outdir
,
levels
=
[
1
])
prog
.
process
(
infiles
,
conf
,
options
.
cache_dir
,
options
.
outdir
,
levels
=
[
1
])
if
__name__
==
"
__main__
"
:
...
...
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