Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pygui/calib/thrufocus
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ camera exptime 10000

# 3. Camera BOI
camera boi R 410 200
camera boi I 580 200
camera boi I 350 200
camera boi G 360 200
### Add G channel BOI
### Add U channel BOI once BOI with binning works.

camera boi U 800 200

# 3.5 Get some information from the camera and set some information
imnum0=(`camera imnum`[1])
Expand All @@ -45,7 +45,7 @@ focusbase="focus_internal_`date +%g%m%d_%H%M%S`"
camera basename $focusbase

# 4. Turn on lamp and wait
fociI=( 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5.0 5.1 5.2 5.3 )
fociI=( 4.4 4.5 4.6 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 )
fociR=( 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 )
fociG=( 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 )
### Add fociU
Expand Down Expand Up @@ -85,7 +85,7 @@ calib set door=close
camera boi R full
camera boi I full
camera boi G full

camera boi U full
#Add camera boi U full

# now set the foci to nominal values, just because we can
Expand Down
113 changes: 113 additions & 0 deletions pygui/calib/thrufocus.260528
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
#!/usr/bin/bash -f

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bash scripts :(

#
# Through-focus
#
# 1. Turn lamp off
# 2. Set exposure time
# 3. Take 3 darks
# 4. Turn lamp on; wait a minute or two
# 5. Put focus stage on the + side of the loop
# 6. Loop over focus positions, take 2 (3?) illuminated exposures at each
# 7. Turn off the lamp
# 8. Take 3 darks
# 9. Exit
#
#
#
#
# 1. Turn lamp off
# Using Argon lamp.

calib set door=open cover=close
power lampthar on
calib lampmod 6 1 1000



# 2. Exposure time.
camera exptime 10000
#

# 3. Camera BOI
camera boi R 410 200
camera boi I 580 200
camera boi G 360 200
### Add G channel BOI
### Add U channel BOI once BOI with binning works.
# camera boi U 800 200

# 3.5 Get some information from the camera and set some information
imnum0=(`camera imnum`[1])
basename=(`camera basename`[1])

focusbase="focus_internal_`date +%g%m%d_%H%M%S`"

camera basename $focusbase

# 4. Turn on lamp and wait
fociI=( 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5.0 5.1 5.2 5.3 )
fociR=( 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 )
fociG=( 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 )
### Add fociU
focpos="1 2 3 4 5 6 7 8 9 10 11 12"
echo $foci
for fp in $focpos; do
# set the focus
# focus set I $focus
echo " FOC I ${fociI[$fp]} R ${fociR[$fp]} G ${fociG[$fp]} No `camera imnum`"
focus set I ${fociI[$fp]}
focus set R ${fociR[$fp]}
focus set G ${fociG[$fp]}
### focus set G ${fociG[$fp]}
### focus set U .....
echo
sleep 4
imnum1=(`camera imnum`[1])
exposen 1
done
#
# Turn off lamp
# power 2 3 off
#
# ./goexpose
# ./goexpose
# ./goexpose
#


camera basename $basename

power lampthar off
calib lampmod 6 0 1000
calib set door=close

# revert BOI
camera boi R full
camera boi I full
camera boi G full
# camera boi U full
#Add camera boi U full

# now set the foci to nominal values, just because we can

focus set G 3.35
focus set R 2.45
focus set I 4.75


# now run the analysis script.




# now display the results


allfiles="$focusbase*.fits"
cd /home/observer/focus/
/home/developer/Software/run/focus_spec.py /data/latest/$allfiles -fa x -fk FOCUS -G /home/observer/focus/gfocus.reg


eog focus_spec_?.png

echo "Done."
113 changes: 113 additions & 0 deletions pygui/calib/thrufocus.260528~
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
#!/usr/bin/bash -f
#
# Through-focus
#
# 1. Turn lamp off
# 2. Set exposure time
# 3. Take 3 darks
# 4. Turn lamp on; wait a minute or two
# 5. Put focus stage on the + side of the loop
# 6. Loop over focus positions, take 2 (3?) illuminated exposures at each
# 7. Turn off the lamp
# 8. Take 3 darks
# 9. Exit
#
#
#
#
# 1. Turn lamp off
# Using Argon lamp.

calib set door=open cover=close
power lampthar on
calib lampmod 6 1 1000



# 2. Exposure time.
camera exptime 10000
#

# 3. Camera BOI
camera boi R 410 200
camera boi I 580 200
camera boi G 360 200
### Add G channel BOI
### Add U channel BOI once BOI with binning works.
camera boi U 800 200

# 3.5 Get some information from the camera and set some information
imnum0=(`camera imnum`[1])
basename=(`camera basename`[1])

focusbase="focus_internal_`date +%g%m%d_%H%M%S`"

camera basename $focusbase

# 4. Turn on lamp and wait
fociI=( 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5.0 5.1 5.2 5.3 )
fociR=( 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 )
fociG=( 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 )
### Add fociU
focpos="1 2 3 4 5 6 7 8 9 10 11 12"
echo $foci
for fp in $focpos; do
# set the focus
# focus set I $focus
echo " FOC I ${fociI[$fp]} R ${fociR[$fp]} G ${fociG[$fp]} No `camera imnum`"
focus set I ${fociI[$fp]}
focus set R ${fociR[$fp]}
focus set G ${fociG[$fp]}
### focus set G ${fociG[$fp]}
### focus set U .....
echo
sleep 4
imnum1=(`camera imnum`[1])
exposen 1
done
#
# Turn off lamp
# power 2 3 off
#
# ./goexpose
# ./goexpose
# ./goexpose
#


camera basename $basename

power lampthar off
calib lampmod 6 0 1000
calib set door=close

# revert BOI
camera boi R full
camera boi I full
camera boi G full
camera boi U full
#Add camera boi U full

# now set the foci to nominal values, just because we can

focus set G 3.35
focus set R 2.45
focus set I 4.75


# now run the analysis script.




# now display the results


allfiles="$focusbase*.fits"
cd /home/observer/focus/
/home/developer/Software/run/focus_spec.py /data/latest/$allfiles -fa x -fk FOCUS -G /home/observer/focus/gfocus.reg


eog focus_spec_?.png

echo "Done."
Loading