-
Notifications
You must be signed in to change notification settings - Fork 35
Feature/mfx is lcls2 #281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Feature/mfx is lcls2 #281
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1da39d0
print message&makepeds command when takepeds is done, but before the …
silkenelson 78e2d91
if passing experiment name, use exp-name to determine hutch if needed…
silkenelson c5f8905
use experiment data file names to determine the DAQ used (workf ro MF…
silkenelson 4b60688
fix a couple small bugs, add axis makepeds (still in progress), add c…
silkenelson 1198a80
Update scripts/makepeds_psana2
silkenelson 28b2737
Update scripts/makepeds
silkenelson 53d5b43
Update scripts/get_info.py
silkenelson 449a5f4
Update scripts/takepeds
silkenelson f345629
Update scripts/makepeds_psana2
silkenelson b84a246
Update scripts/makepeds_psana2
silkenelson d7ec510
Update scripts/get_info.py
silkenelson def9d0c
Update scripts/makepeds_psana2
silkenelson b8c4f6c
Update makepeds_psana2
silkenelson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ | |
| parser.add_argument("--exp", help="get experiment name", action='store_true') | ||
| parser.add_argument("--live", help="ongoing?", action='store_true') | ||
| parser.add_argument("--ended", help="ended", action='store_true') | ||
| parser.add_argument("--daq", help="get DAQ type", action='store_true') | ||
| parser.add_argument("--hutch", help="get experiment for hutch xxx") | ||
| parser.add_argument("--station", help="optional station for hutch with two daqs, e.g. cxi and mfx") | ||
| parser.add_argument("--getHutch", help="get hutch (uppercase)", action='store_true') | ||
|
|
@@ -115,8 +116,12 @@ | |
| hutch = 'LFE' # because we have so many names for the same subnet. | ||
| foundHutch = True | ||
| if not foundHutch: | ||
| # then ask.....outside of python | ||
| print('unknown_hutch') | ||
| if args.setExp: | ||
| hutch = args.setExp[:3].upper() | ||
KaushikMalapati marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| foundHutch = True | ||
| else: | ||
| # then ask.....outside of python | ||
| print('unknown_hutch') | ||
| sys.exit() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't this sys.exit() need to be in the else block so that we don't return if we get the hutch from args.setExp?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shoot, yes! |
||
| if args.getHutch: | ||
| print(hutch.upper()) | ||
|
|
@@ -203,6 +208,22 @@ | |
| logger.exception("No runs?") | ||
| print('No runs taken yet') | ||
|
|
||
| if args.daq: | ||
| if args.setExp: | ||
| exp = args.setExp | ||
| else: | ||
| resp = requests.get(ws_url + "/lgbk/ws/activeexperiment_for_instrument_station", | ||
| {"instrument_name": hutch, "station": station}) | ||
| exp = resp.json().get("value", {}).get("name") | ||
KaushikMalapati marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| r = requests.get(ws_url + "/lgbk/" + exp + "/ws" | ||
| + "/file_counts_by_extension") | ||
| r.raise_for_status() | ||
KaushikMalapati marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| if "xtc2" in r.json()["value"]: | ||
KaushikMalapati marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| print('LCLS2') | ||
| else: | ||
| print('LCLS1') | ||
|
|
||
| if args.files_for_run or args.nfiles_for_run: | ||
| if args.files_for_run: | ||
| run = int(args.files_for_run) | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.