scexao-org / camstack

EDT cam stack - python + minimal imgtake.c
5 stars 2 forks source link

Camstack

Camera management stuff. Including keywords and TCP streaming from the stream source.

Gets installed with pip install -e .

Look at the scripts/startOCAM to get an idea. This creates the python control shell in ocam_ctrl.

Also includes the camera viewers - and their backups


Camera acquisition stack

Layout

./scripts folder: bash launcher scripts. Cleanup of the <cam>_ctrl tmux, and eventually launch the python camstack.cam_mains.<cam> main script.

./camstack/cam_mains folder: camera launcher python scripts.

Camera startup

Instantiating the Camera class eventually results in the camera freerunning in a shared memory and all the auxiliary tasks being started.

The camera launcher camstack.cam_mains.<cam> script, which runs in the <cam>_ctrl tmux session, eventually drops to an interactive python prompt. This is where you control the camera. A clean quit is performed by issuing the close() command.

Init sequence:

This is the general outline of what happens during the Camera Class constructor.

See a more extensive example in this page

Changing camera "mode"

Changing "mode" really means changing crop size. The framegrabber has to be reconfigured, all SHMs re-instantiated with their new size, etc. Pretty much all steps above are called in the same order. This is done without quitting at the <cam>_ctrl command prompt, by calling set_camera_mode(some_predefined_mode_id).

For dumb cameras (acquisition channel but no control channel), the FG acquisition can be set to an arbitrary size dynamically by calling set_camera_size(height, width).

Recap

Camera What Class Medium Bash entry Python entry Computer Stream Raw stream
Apapane CRED1 Apapane Camlink cam-apapanestart apapane.py scexao5 apapane apapane_raw
Palila CRED2 Palila Camlink cam-palilastart palila.py scexao5 palila palila_raw
GLINT CRED2 GLINT Camlink cam-glintstart glintcam.py scexao5 glint
Kiwikiu CRED2 Kiwikiu Camlink cam-kiwikiustart kiwikiu.py scexao5 kiwikiu
Reno Ocam2K OCAM2K Camlink cam-ocamstart renocam.py scexao5 ocam2d ocam2krc
Alala OrcaQuest AlalaOrcam CoaxPress (x)or USB3 cam-alalacamstart first_orcam.py alala orcam
FIRST OrcaQuest FIRSTOrcam CoaxPress (x)or USB3 cam-fircamstart alala_orcam.py kamua orcam
FLIR BlackFlyS BlackFlyS USB3
FLIR GS3-U3-23S6M Grasshopper3 USB3 scexao5
FLIR FL3-U3-13S2M Flea3 USB3 cam-vpupcamstart vpupcam.py vampires vpupcam
FLIR FL3-U3-13S2M Flea3 USB3 kamua
Nuvu HNü128AO Kalao Camlink kalaocam.py
VCam Andor897 Vampires Camlink scexao5 vcamim<k>
FIRST Andor897 First Camlink kamua

Class tree: