Skip to content

Commit

Permalink
NO CODE -- LINT ALL per pre-coomit
Browse files Browse the repository at this point in the history
  • Loading branch information
DasVinch committed Oct 1, 2024
1 parent 2c24d6b commit c2b23ec
Show file tree
Hide file tree
Showing 165 changed files with 1,500 additions and 1,205 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
"utility": "c",
"random": "c"
}
}
}
2 changes: 0 additions & 2 deletions AOloopControl/AOloopControl.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,3 @@ static errno_t init_module_CLI()

return RETURN_SUCCESS;
}


4 changes: 2 additions & 2 deletions AOloopControl/examples/KalAO-ttmloop-conf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ The following files are written to ./conf/DMmodes/ :
- HpokeC.fits : Hadamard modes
- Hmat.fits : Hadamard matrix (to convert Hadamard-zonal)
- Hpixindex.fits : Hadamard pixel index
- SmodesC.fits :
- SmodesC.fits :



Expand Down Expand Up @@ -127,7 +127,7 @@ cacao-aorun-031-RMHdecode
This should not be used when actually using KalAO as it would overwrite the NCPA reference.

```bash
# Acquire reference
# Acquire reference
# cacao-aorun-026-takeref
```

Expand Down
18 changes: 9 additions & 9 deletions AOloopControl/examples/MAPS-vispyr-conf/ObsRunNotes.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Observing Run Notes:

These are notes for running MAPs as of the 2023 May/June run. References to simulations are cut out for ease of use.
These are notes for running MAPs as of the 2023 May/June run. References to simulations are cut out for ease of use.

## Streams

Milk commands for keeping tabs on streams:
- `milk-streamCTRL`
- x => exit the viewer
- x => exit the viewer
- `milk-fpsCTRL` => "Function Parameter monitor" can set params and run proc from here
- shift + R => starts a process
- ctrl + R => ends a process
Expand Down Expand Up @@ -36,20 +36,20 @@ connect to hardware
<br> `./scripts/aorun-setmode-hardw`


## CHAI: Setting up
## CHAI: Setting up
(not a part of this package, MAPs specific)

```bash
chai
> ttmod.enable
> ttmod.start
> ttmod.start
# these previous two lines have been automated at time of writing
> viswfs.enable # starting the wfs streams
> cacao.enable
> cacao.enable
```
Once chai has been started, we can look at wfs streams
``` bash
rtimview viswfs_slopes &
rtimview viswfs_slopes &
rtimview viswfs_pupils &
```

Expand All @@ -65,7 +65,7 @@ Start WFS fram aquisition

### DM to WFS latency

Running from command line:
Running from command line:
```bash
# option -w is to wait for completion
cacao-aorun-020-mlat -w
Expand Down Expand Up @@ -167,8 +167,8 @@ cacao-fpsctrl setval mfilt loopON ON

Alternatively, on the fpsCTRL
- shift + R `wfs2cmodeval`
- shift + R `mfilt`
- shift + R `mvalC2dm`
- shift + R `mfilt`
- shift + R `mvalC2dm`
- edit values in `mfilt`
- `mfilt -> loopgain -> 0.1`
- `mfilt -> loopmult -> 0.98`
Expand Down
9 changes: 4 additions & 5 deletions AOloopControl/examples/MAPS-vispyr-conf/SimpleStartup.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ cacao-aorun-025-acqWFS -w start
```

Now we are picking a calibration
```
```
ls ../maps-calibs
```
find the <calib-dir> from that list that you want to use tonight.

```
cacao-calib-apply <calib-dir>
```
^ long term, this needs to shut down all confs and restart them again, this ensures the proper resp mat sizes.
^ long term, this needs to shut down all confs and restart them again, this ensures the proper resp mat sizes.

```
cacao-aorun-050-wfs2cmval start
Expand All @@ -32,9 +32,8 @@ cacao-aorun-070-cmval2dm start
```

To start the 2D DM viewing stream:
```
```
tmux new -s remap
./scripts/maps-remapdm10disp
./scripts/maps-remapdm10disp
ctrl-b d
```

2 changes: 1 addition & 1 deletion AOloopControl/examples/MAPS-vispyr-conf/cacaovars.bash
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export CACAO_FPSPROC_MLAT="ON"
#
export CACAO_FPSPROC_ACQUWFS="ON"

# Acquire linear RM
# Acquire linear RM
#
export CACAO_FPSPROC_MEASURELINRESP="ON"

Expand Down
1 change: 0 additions & 1 deletion AOloopControl/examples/MAPS-vispyr-conf/data/mk2Dmapping
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ saveFITS actmap mapping.fits
listim
exitCLI
EOF

1 change: 0 additions & 1 deletion AOloopControl/examples/MAPS-vispyr-conf/data/mkMapping.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ saveFITS actmap mapping.fits
listim
exitCLI
EOF

Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ setval acquWFS-LOOPNUMBER.procinfo.RTprio 49
setval acquWFS-LOOPNUMBER.procinfo.cset aol0RT
setval acquWFS-LOOPNUMBER.procinfo.loopcntMax -1
setval acquWFS-LOOPNUMBER.WFSnormfloor 1.0

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ln -sf ${MILK_SHM_DIR}/${CACAO_WFSSTREAMSIM}.im.shm ${MILK_SHM_DIR}/aol${CACAO_L

# DM
echo "Linking DM ${CACAO_DMSIMINDEX}"

ln -sf ${MILK_SHM_DIR}/dm${CACAO_DMSIMINDEX}disp03.im.shm ${MILK_SHM_DIR}/aol${CACAO_LOOPNUMBER}_dmC.im.shm

ln -sf ${MILK_SHM_DIR}/dm${CACAO_DMSIMINDEX}disp00.im.shm ${MILK_SHM_DIR}/aol${CACAO_LOOPNUMBER}_dmO.im.shm
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env bash

./scripts/maps-remapshmim dm10disp dm10disp2D

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tmux send-keys -t dm00disp2D Enter
##########################################
#
# Setup aol2_dmC2D
#
#
##########################################

# Check if the session exists, discarding output
Expand All @@ -46,7 +46,7 @@ tmux send-keys -t aol2_dmC2D Enter
##########################################
#
# Setup aol2_dmRM2D
#
#
##########################################

# Check if the session exists, discarding output
Expand All @@ -62,5 +62,3 @@ tmux send-keys -t aol2_dmRM2D Enter
tmux send-keys -t aol2_dmRM2D C-c
tmux send-keys -t aol2_dmRM2D "./scripts/maps-remapshmim aol2_dmRM aol2_dmRM2D"
tmux send-keys -t aol2_dmRM2D Enter


Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ sendFPScmd "runstart DMatmturb-2"


./scripts/maps-unmapturb

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env bash

./scripts/maps-unmapshmim mapsturb2D dm10disp10

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-apd188-conf/cacaovars.bash
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,3 @@ echo "Processing cacaovars file ${cvarf}"
. ./${cvarf}
done
shopt -u nullglob #revert nullglob back to it's normal default state

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-apd188-conf/runexample
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#!/usr/bin/env bash

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-apd3k-conf/cacaovars.bash
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,3 @@ echo "Processing cacaovars file ${cvarf}"
. ./${cvarf}
done
shopt -u nullglob #revert nullglob back to it's normal default state

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-apd3k-conf/runexample
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#!/usr/bin/env bash

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-bimdm3kpt-conf/cacaovars.bash
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,3 @@ echo "Processing cacaovars file ${cvarf}"
. ./${cvarf}
done
shopt -u nullglob #revert nullglob back to it's normal default state

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-bimdm3kpt-conf/runexample
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#!/usr/bin/env bash

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-lowfs188-conf/cacaovars.bash
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,3 @@ echo "Processing cacaovars file ${cvarf}"
. ./${cvarf}
done
shopt -u nullglob #revert nullglob back to it's normal default state

Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ setval mfilt-LOOPNUMBER.procinfo.triggersname aolLOOPNUMBER_modevalWFS

setval mvalC2dm-LOOPNUMBER.procinfo.RTprio 48
setval mvalC2dm-LOOPNUMBER.procinfo.cset aolrt
setval mvalC2dm-LOOPNUMBER.GPUindex 99
setval mvalC2dm-LOOPNUMBER.GPUindex 99
1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-lowfs188-conf/runexample
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#!/usr/bin/env bash

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-lowfs3k-conf/cacaovars.bash
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,3 @@ echo "Processing cacaovars file ${cvarf}"
. ./${cvarf}
done
shopt -u nullglob #revert nullglob back to it's normal default state

Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ setval mfilt-LOOPNUMBER.procinfo.triggersname aolLOOPNUMBER_modevalWFS

setval mvalC2dm-LOOPNUMBER.procinfo.RTprio 48
setval mvalC2dm-LOOPNUMBER.procinfo.cset aolrt
setval mvalC2dm-LOOPNUMBER.GPUindex 99
setval mvalC2dm-LOOPNUMBER.GPUindex 99
1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-lowfs3k-conf/runexample
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#!/usr/bin/env bash

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-nirpyr188-conf/aolooptest
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env bash

# Full deployment test

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-nirpyr188-conf/cacaovars.bash
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,3 @@ echo "Processing cacaovars file ${cvarf}"
. ./${cvarf}
done
shopt -u nullglob #revert nullglob back to it's normal default state

Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,3 @@ setval wfscamsim-LOOPNUMBER.wfscamim iiwisim
setval wfscamsim-LOOPNUMBER.fluxtotal 30000.0
setval wfscamsim-LOOPNUMBER.camgain 0.01
setval wfscamsim-LOOPNUMBER.compphnoise OFF

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-nirpyr188-conf/runexample
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#!/usr/bin/env bash

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-nirpyr3k-conf/aolooptest
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env bash

# Full deployment test

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-nirpyr3k-conf/cacaovars.bash
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,3 @@ echo "Processing cacaovars file ${cvarf}"
. ./${cvarf}
done
shopt -u nullglob #revert nullglob back to it's normal default state

Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,3 @@ setval wfscamsim-LOOPNUMBER.wfscamim iiwisim
setval wfscamsim-LOOPNUMBER.fluxtotal 30000.0
setval wfscamsim-LOOPNUMBER.camgain 0.01
setval wfscamsim-LOOPNUMBER.compphnoise OFF

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-nirpyr3k-conf/runexample
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#!/usr/bin/env bash

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-ttoff188-conf/aolooptest
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env bash

# Full deployment test

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-ttoff188-conf/cacaovars.bash
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,3 @@ echo "Processing cacaovars file ${cvarf}"
. ./${cvarf}
done
shopt -u nullglob #revert nullglob back to it's normal default state

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-ttoff188-conf/runexample
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#!/usr/bin/env bash

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-ttoff3k-conf/aolooptest
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env bash

# Full deployment test

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-ttoff3k-conf/cacaovars.bash
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,3 @@ echo "Processing cacaovars file ${cvarf}"
. ./${cvarf}
done
shopt -u nullglob #revert nullglob back to it's normal default state

1 change: 0 additions & 1 deletion AOloopControl/examples/ao3k-ttoff3k-conf/runexample
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#!/usr/bin/env bash

24 changes: 11 additions & 13 deletions AOloopControl/examples/scexao-NIRPL-conf/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Overview
## Near-IR Photonic Lantern - photometric
## Near-IR Photonic Lantern - photometric
(scroll down for dispersed PL instructions!)

cacao-task-manager tasks for this example :
Expand Down Expand Up @@ -223,12 +223,12 @@ cacao-fpsctrl setval mfilt loopON ON

```
## NIRPL - dispersed mode
In this section we set up and test the simulator mode for the dispersed 3-port PL. This involves new `cacao` functions. Work in progress! Currently testing on my laptop (WSL2).
In this section we set up and test the simulator mode for the dispersed 3-port PL. This involves new `cacao` functions. Work in progress! Currently testing on my laptop (WSL2).

### Simulator mode
To run simulator mode you will need to two things: an N x M reference wfs image and an N x M x 2500 zonal response matrix.
These files need to be named `wfsref.fits` and `respM.fits`, and put in (or replaced in) `scexao-NIRPL-conf/simLHS`. Currently,
the simulator is configured to pull old files corresponding to a non-dispersed 19-port PL, imaged on `glint`, from some google drive link, and I don't know how to change that.
These files need to be named `wfsref.fits` and `respM.fits`, and put in (or replaced in) `scexao-NIRPL-conf/simLHS`. Currently,
the simulator is configured to pull old files corresponding to a non-dispersed 19-port PL, imaged on `glint`, from some google drive link, and I don't know how to change that.

### Loop deployment
As usual, run
Expand All @@ -237,7 +237,7 @@ As usual, run
cacao-loop-deploy scexao-NIRPL
```

to deploy the loop. Then, to start the simulator, run
to deploy the loop. Then, to start the simulator, run

```bash
./scripts/aorun-setmode-sim
Expand Down Expand Up @@ -272,23 +272,23 @@ To make this shared memory, use
which will call a Python function in `scripts/utility.py`. To edit the behavior of this script, you can add new functions to this file.

### Take dark
First we take a raw (full-frame) dark with
First we take a raw (full-frame) dark with
```bash
cacao-aorun-005-takedark
```
which copies the dark to the shared memory `aol6_wfsdarkraw`.

Then we remap this dark using
Then we remap this dark using
```bash
./scripts/scexao-NIRPL-mapdark-spec
```
(which, again, you might need to run twice. The first run will initialize some needed shared memories - I need to automate this better). This rewrites `aol6_wfsdark` so it has a shape of N x Z.

### WFS image acquisition

Finally, we can start the `acquire_spectra-6` function through `fpsCTRL`. In `comp`, there are toggles for dark subtraction, normalization. Note that the normalization is different than what is done in `acqu_WFS-6`; normalization is done per-wavelength, as opposed to dividing the entire WFS image by the flux total. After running, the processed WFS image is written to the shared memory `aol6_imWFS2` as usual.
Finally, we can start the `acquire_spectra-6` function through `fpsCTRL`. In `comp`, there are toggles for dark subtraction, normalization. Note that the normalization is different than what is done in `acqu_WFS-6`; normalization is done per-wavelength, as opposed to dividing the entire WFS image by the flux total. After running, the processed WFS image is written to the shared memory `aol6_imWFS2` as usual.

You can also take a reference using
You can also take a reference using
```bash
cacao-aorun-026-takeref
```
Expand All @@ -299,7 +299,7 @@ Finally, you can average the traces horizontally by `x` pixels using the `binnin

## how to install and uninstall
### installation
In your $MILK_ROOT folder, do
In your $MILK_ROOT folder, do
```bash
cd plugins/cacao-src
git pull
Expand All @@ -322,8 +322,6 @@ rm -r .NIRPL*
tmux kill-server
rm -r /milk/shm/*
```
Maybe don't run this if you have other shared memories you don't want to nuke.
Maybe don't run this if you have other shared memories you don't want to nuke.

THE END (for now)


Loading

0 comments on commit c2b23ec

Please sign in to comment.