Difference between revisions of "PITA scan"
From PREX Wiki
Catherinef (Talk | contribs) (→How to Run the PITA Scan) |
(→Getting Started) |
||
(10 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<span style="color:red">In the process of editing and updating this page. Please contact Juliette Mammei <B>[mailto:crowder@jlab.org?Subject=PREXwiki crowder@jlab.org]</B> with questions or suggestions.</span> | <span style="color:red">In the process of editing and updating this page. Please contact Juliette Mammei <B>[mailto:crowder@jlab.org?Subject=PREXwiki crowder@jlab.org]</B> with questions or suggestions.</span> | ||
<br><br> | <br><br> | ||
− | [ | + | [[Main_Page|<B>PREX Main</B>]]<< [[Information for Shift Takers]] << [[Shift Leader]] << [[HOW TOs]] << [[Expert Tools]] |
− | This page will tell you step-by-step how to run a PITA scan. | + | This page will tell you step-by-step how to run a PITA/IA scan. |
== Getting Started == | == Getting Started == | ||
+ | |||
+ | <span style="color:red"> '''DON'T USE THIS PAGE!!! OBSOLETE!!! https://prex.jlab.org/wiki/index.php/PITA_scan_HOWTO''' </span> | ||
+ | |||
+ | |||
<span style="color:red"> '''Do NOT test this script - it actually changes the EPICS variables!''' </span> | <span style="color:red"> '''Do NOT test this script - it actually changes the EPICS variables!''' </span> | ||
Line 13: | Line 17: | ||
*Analysis macros are located in | *Analysis macros are located in | ||
**<pre> /adaqfs/home/apar/yufan/scan </pre> | **<pre> /adaqfs/home/apar/yufan/scan </pre> | ||
− | + | # | |
*If you'd like to move the pita scan files to another directory: | *If you'd like to move the pita scan files to another directory: | ||
*# Move the ENTIRE /scan FOLDER. The code uses other python classes that you will need in the scan directory. | *# Move the ENTIRE /scan FOLDER. The code uses other python classes that you will need in the scan directory. | ||
Line 19: | Line 23: | ||
*#* <pre> chmod +x scan.py </pre> | *#* <pre> chmod +x scan.py </pre> | ||
− | == How to Run the PITA Scan == | + | == How to Run the PITA/IA Scan == |
+ | # Make sure that Channel Access is granted on IOC ioceegstep1 | ||
# Open the file <font face="Courier"> parameters_PITA.txt </font> | # Open the file <font face="Courier"> parameters_PITA.txt </font> | ||
#* Changes to make | #* Changes to make | ||
Line 26: | Line 31: | ||
#*#* Injector: 3 | #*#* Injector: 3 | ||
#*# Change <font face="Courier"> wait_time </font> to how long (in seconds) you'd like to take data for each PITA value | #*# Change <font face="Courier"> wait_time </font> to how long (in seconds) you'd like to take data for each PITA value | ||
− | #*# Change <font face="Courier"> | + | #*# Change <font face="Courier"> step_size </font> to how much you would like to increase/decrease the EPICS variable for each step |
#*# Change <font face="Courier"> max_step </font> to the number of steps you would like the program to run | #*# Change <font face="Courier"> max_step </font> to the number of steps you would like the program to run | ||
+ | #*# Change <font face="Courier"> beam_current </font> to the beam current you use in the PITA scan | ||
#*# Example | #*# Example | ||
− | #*#* If you set | + | #*#* If you set step_size = 100 and max_step = 3, and the original PITA read value was 371, then PITA1 and PITA2 will go as: 371+100, 371-100, 371+200, 371-200, 371+300, 371-300 |
− | + | # Run the PITA/IA scan by typing | |
− | # Run the PITA scan by typing | + | |
#* <pre> ./scan.py pita </pre> | #* <pre> ./scan.py pita </pre> | ||
− | # If the scan finished successfully, you will see '''"pita SCAN finished"''' printed to the terminal | + | #* <pre> ./scan.py aia </pre> |
+ | #* <pre> ./scan.py cia </pre> | ||
+ | # If the scan finished successfully, you will see '''"pita/aia/cia SCAN finished"''' printed to the terminal | ||
# If the scan had an error, you will see '''"Something went wrong! Check the error.txt file"''' printed to the terminal | # If the scan had an error, you will see '''"Something went wrong! Check the error.txt file"''' printed to the terminal | ||
#* Errors will be printed in the error.txt file | #* Errors will be printed in the error.txt file | ||
Line 42: | Line 49: | ||
# Read the origin EPICS read variable and origin scandata1 values | # Read the origin EPICS read variable and origin scandata1 values | ||
# Set cleandata to NOT CLEAN(0) | # Set cleandata to NOT CLEAN(0) | ||
− | # Set the scandata1 value to the new PITA voltage through the socket | + | # Set the scandata1 value to the new PITA/IA voltage through the socket |
# Set cleandata to CLEAN(1) | # Set cleandata to CLEAN(1) | ||
# Wait for wait_time (set by user) | # Wait for wait_time (set by user) | ||
# Set cleandata to NOT CLEAN(0) | # Set cleandata to NOT CLEAN(0) | ||
− | # Set PITA1 | + | # Set PITA Scan:PITA1,PITA2 or AIA scan:DAC03,DAC04,DAC05,DAC06 or CIA scan:DAC11,DAC12,DAC13,DAC14 to the new set point |
# Check if the set value is updated | # Check if the set value is updated | ||
− | # Set APPLY TO CELL variable to 1 (click the button) | + | # Set APPLY TO CELL variable to 1 (click the button) <span style="color:red"> only apply for PITA scan </span> |
− | # Check the readback value of | + | # Check the readback value of EPICS |
− | # Set the scandata1 value1 to the new | + | # Set the scandata1 value1 to the new set point through the socket |
# Set cleandata to CLEAN(1) | # Set cleandata to CLEAN(1) | ||
− | # | + | # Waiting for wait_time (set by user) |
+ | ## if the beam_current is less than 3uA (tripped), then set cleandata to NOT CLEAN(0), wait until the beam is back for 10 seconds, set the timer back and set cleandata to CLEAN(1), then restart waiting for wait_time | ||
+ | ## there is also a counter to indicate how many times the beam is tripped during one waiting step which shows the log.txt file | ||
# Repeat as next values | # Repeat as next values | ||
# After setting all the set points | # After setting all the set points | ||
# Set cleandata to NOT CLEAN(0) | # Set cleandata to NOT CLEAN(0) | ||
− | # Change | + | # Change EPICS variable and scandata1 to their original values |
− | + | ||
# Finish | # Finish |
Latest revision as of 13:44, 4 February 2020
In the process of editing and updating this page. Please contact Juliette Mammei crowder@jlab.org with questions or suggestions.
PREX Main<< Information for Shift Takers << Shift Leader << HOW TOs << Expert Tools
This page will tell you step-by-step how to run a PITA/IA scan.
Getting Started
DON'T USE THIS PAGE!!! OBSOLETE!!! https://prex.jlab.org/wiki/index.php/PITA_scan_HOWTO
Do NOT test this script - it actually changes the EPICS variables!
- You need to be logged on to the adaq account:
ssh apar@adaq1
- Analysis macros are located in
/adaqfs/home/apar/yufan/scan
- If you'd like to move the pita scan files to another directory:
- Move the ENTIRE /scan FOLDER. The code uses other python classes that you will need in the scan directory.
- Go to the directory where you moved the files, and type
-
chmod +x scan.py
-
How to Run the PITA/IA Scan
- Make sure that Channel Access is granted on IOC ioceegstep1
- Open the file parameters_PITA.txt
- Changes to make
- Change the crate_number to
- Counting House: 0
- Injector: 3
- Change wait_time to how long (in seconds) you'd like to take data for each PITA value
- Change step_size to how much you would like to increase/decrease the EPICS variable for each step
- Change max_step to the number of steps you would like the program to run
- Change beam_current to the beam current you use in the PITA scan
- Example
- If you set step_size = 100 and max_step = 3, and the original PITA read value was 371, then PITA1 and PITA2 will go as: 371+100, 371-100, 371+200, 371-200, 371+300, 371-300
- Change the crate_number to
- Changes to make
- Run the PITA/IA scan by typing
-
./scan.py pita
-
./scan.py aia
-
./scan.py cia
-
- If the scan finished successfully, you will see "pita/aia/cia SCAN finished" printed to the terminal
- If the scan had an error, you will see "Something went wrong! Check the error.txt file" printed to the terminal
- Errors will be printed in the error.txt file
- You can double-check the behavior of the script by looking at the log.txt file
How does it work?
The script does the following:
- Read the origin EPICS read variable and origin scandata1 values
- Set cleandata to NOT CLEAN(0)
- Set the scandata1 value to the new PITA/IA voltage through the socket
- Set cleandata to CLEAN(1)
- Wait for wait_time (set by user)
- Set cleandata to NOT CLEAN(0)
- Set PITA Scan:PITA1,PITA2 or AIA scan:DAC03,DAC04,DAC05,DAC06 or CIA scan:DAC11,DAC12,DAC13,DAC14 to the new set point
- Check if the set value is updated
- Set APPLY TO CELL variable to 1 (click the button) only apply for PITA scan
- Check the readback value of EPICS
- Set the scandata1 value1 to the new set point through the socket
- Set cleandata to CLEAN(1)
- Waiting for wait_time (set by user)
- if the beam_current is less than 3uA (tripped), then set cleandata to NOT CLEAN(0), wait until the beam is back for 10 seconds, set the timer back and set cleandata to CLEAN(1), then restart waiting for wait_time
- there is also a counter to indicate how many times the beam is tripped during one waiting step which shows the log.txt file
- Repeat as next values
- After setting all the set points
- Set cleandata to NOT CLEAN(0)
- Change EPICS variable and scandata1 to their original values
- Finish