Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

implement preUSAXStune #47

Closed
prjemian opened this issue Jul 27, 2018 · 2 comments
Closed

implement preUSAXStune #47

prjemian opened this issue Jul 27, 2018 · 2 comments
Assignees
Labels

Comments

@prjemian
Copy link
Contributor

SPEC code:

# /home/beams/USAXS/spec/macros/local/usaxs_tuning.mac
def preUSAXStune '
  DCMfeedbackON
  closeCCDshutter                         # close CCD shutter in case we are in Radiography mode
  IfRequestedStopBeforeNextScan           # stop if user chose to do so. 
  useModeUSAXS                            # should be done only in USAXS mode. 
  moveDetector DIODE_DX DIODE_DY          # if user was in Radiography mode, move diode in place
  global useSBUSAXS 
  global useMSstage
  epics_put ("9idcLAX:USAXS:timeStamp",   date())
  epics_put ("9idcLAX:USAXS:state",       "pre-USAXS optics tune")
  openMonoShutter
  usaxs_CheckBeamStandard
  chk_beam_on
  set_USAXS_Slits                        # make sure USAXS slits are set correctly...
  autorange_I0I00amps                    # set correctly the gains for I0 and I00
  tune_mr;                               # tune M stage to monochromator
  tune_m2rp;                             # tune M stage paralelity
  #tune_m2rp_fbe;                         # tune M stage paralelity using feedback
  if(useSBUSAXS==1||useMSstage==1){tune_msrp} # tune msrp stage
  if(useSBUSAXS==1){tune_asrp}           # tune asrp stage and set ASRP0 value
  autorange_UPDI0I00                     # set correctly the ranges for all amplifiers
  tune_ar ;                              # tune up the analyzer crystal pair
  autorange_UPDI0I00                     # set correctly the ranges for all amplifiers
  tune_a2rp ;                            # tune up the analyzer crystal pair
  #tune_a2rp_fbe                         # using the feedback    
  printf ("USAXS count time is %g second(s)\n", USAXS_TIME)
  ct USAXS_TIME
  epics_put ("9idcLAX:USAXS:timeStamp",   date())
  epics_put ("9idcLAX:USAXS:state",       "pre-USAXS optics tuning done")
  set_NumScansFromLastTune 0
  set_RunPreUSAXStuneNext 0
  set_EPOCHTimeOfLastTune time()
'
@prjemian prjemian added this to the 2018-2 USAXS Imaging milestone Jul 27, 2018
@prjemian prjemian self-assigned this Jul 27, 2018
@prjemian
Copy link
Contributor Author

not so fast: lots of prerequisites for this

@jilavsky: lowering the priority since step and fly scans must work first

@prjemian prjemian removed the high priority more urgent label Jul 27, 2018
prjemian pushed a commit that referenced this issue Jul 27, 2018
prjemian pushed a commit that referenced this issue Aug 8, 2018
prjemian pushed a commit that referenced this issue Aug 8, 2018
prjemian pushed a commit that referenced this issue Aug 8, 2018
@prjemian
Copy link
Contributor Author

looks complete, needs testing

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant