Skip to content

Commit

Permalink
tweak set_user_md_api, new alignment positions.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikfarquhar authored and XFP Operator committed May 24, 2024
1 parent e781702 commit 5d6a666
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions startup/02-proposal-utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ def get_proposals_for_instrument(cycle, instrument):
proposals_on_instrument.append(proposal_num)
return proposals_on_instrument

def get_current_cycle():
return get_from_api(f"facility/nsls2/cycles/current")["cycle"]

def inst_proposals_report(cycle, instrument, detail):
'''
Queries NSLS-II API for proposals for specified instrument and cycle.
Expand Down Expand Up @@ -108,11 +111,13 @@ def set_user_md_api():
Function to define user / experiment values as persistant metadata
Retrieve info from NSLS-II API based on collected proposal_id.
'''
short_report = input("Retrieve list of proposals (y/n)? ")
short_report = input("Retrieve list of proposals for current cycle (y/n)? ")
if short_report == 'y':
cycle_num = input("Which cycle (e.g. '2024-1')? ")
cycle_num = get_current_cycle()
inst_proposals_report(cycle=cycle_num, instrument='XFP', detail='short')
print(" ")
else:
pass
proposal_num = input("Enter the proposal number: ")
api_proposal_report(proposal_num)
saf_num = input("\nEnter the SAF number: ")
Expand Down
4 changes: 2 additions & 2 deletions startup/97-align-ht.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from bluesky.callbacks.fitting import PeakStats


HT_X_START = 0.8
HT_Y_START = -76.40
HT_X_START = 1.1
HT_Y_START = -76.55
HT_COORDS_FILE = str(PROFILE_STARTUP_PATH / 'ht_coords.csv')
HT_COORDS_FILE_OLD = str(PROFILE_STARTUP_PATH / 'ht_coords_old.csv')
LOAD_POS_X = -90
Expand Down

0 comments on commit 5d6a666

Please sign in to comment.