Skip to content

[WIP] Autofetch for Hispec ATC #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 427 commits into from

Conversation

mikelangmayr
Copy link
Contributor

@mikelangmayr mikelangmayr commented May 6, 2025

  • Increase network buffer size
  • change network socket to non_blocking
  • implement autofetch flow
    • less polling
    • no frame status call
    • handle autofetch data
    • parse autofetch headers
    • don't write to disk
    • no FIONREAD
    • write to zmq xpub/xsub
    • logging in separate thread
    • etc.

scizen9 and others added 30 commits July 26, 2024 16:57
* Scale exptime in wait_for_exposure in archon.cpp

* Update comment to reflect required units (ms) for timeout in wait_for_expose in archon.cpp
* Replace calls to timout with float parameter with calls to sleep_for with millisecond parameter in archon.cpp

* Clang-tidy updates in utilities.cpp and utilities.h

* Clang-tidy updates in utilities.cpp and utilities.h

* Separate declaration from function definition for rtrim in utilities.h and utilities.cpp
* Try to run emulator test on workflows

* Add branch to workflow

* run camerad in foreground

* use socksend instead of telnet for tests

* update workflow

* update config paths

* add more test commands

* fix alias

* check test results in workflow

* fix if statements in workflow

* use exit instead of return to fail workflow task

* use bash function

* fix bug

* comment out exptime for now

* fix indentation

* change trigger branch back to master

* move demo configuration into demo folder

* set default INSTR in cmake file

* run workflow one more time to test

* fix type

* comment out exptime test

* change branch to master
* remove c17 flags

* set default port in sendcmd to remove cmake warning

* comment out expose test command

* set workflow branch back to master
* Add first unit test using gtest

* fixe typo in branch name

* install gtest dependencies

* clean up cmake file

* add unit tests to github workflow

* clean up

* update README

* README cleanup

* add timezone local test

* remove local timezone test
* run clang-tidy on codebase and update code

* update workflow branch

* undo changes to archon.cpp because it's too large (8K lines)

* build tests optionally

* Add pthread to unit_test target libraries

* add gtest requirement to README.md
* fix e2e tests

* fix e2e tests

* fix e2e tests

* add -i flag to emulator

* fix e2e tests

* fix e2e tests

* fix e2e tests
…ed connection (#33)

Co-authored-by: David Hale <[email protected]>
Co-authored-by: David Hale <[email protected]>
* Initial try at adding power control to camerad in archon.cpp, archon.h, camerad.cpp, and generic.cpp

* Added power_status property to Camera object in camera.h

* Added get_status_key to archon.cpp

* Added get_status_key to archon.h

* Putting in all the steps for H2RG setup and sleeps in hsetup routine in archon.cpp

* returning hsetup routine to just the setup command used before in archon.cpp

* Added tested code for hsetup that will actually configure the chip correctly in archon.cpp

* Update hsetup docstring in archon.cpp

* Changing deprecated sleep commands with std::this_thread::sleep_for commands in hsetup function in archon.cpp
* adds test commands: rconfigmap, rconfig, logwconfig

* fixes bug in Archon::Interface::load_acf() which didn't properly write VCPU configuration lines

---------

Co-authored-by: David Hale <[email protected]>
* Remove hard coded paths for g++ and rename .c files to .cpp since they were already treated as cpp

* cleanup

* clean up g++ flags, require g++ compiler
* adopted c++ idiomataic practices for listener, sendcmd, md5

* fixes typo in comment

---------

Co-authored-by: David Hale <[email protected]>
* fixes bug waiting for exposure and introduces ExposureTime class

* renames Camera::ExposureTime bools to improve clarity

---------

Co-authored-by: David Hale <[email protected]>
* add autofetch command to camerad

* start adding autofetch support

* find buffer variable

* disable frame_status() request in autofetch mode

* disable Poll() request in autofetch mode

* disable Fetch() request in autofetch mode

* parse autofetch header

---------

Co-authored-by: Michael Langmayr <[email protected]>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we should add the ACF file to the camera-interface repo.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure we should add instrument-specifics to general code base.

Copy link
Collaborator

@astronomerdave astronomerdave left a comment

Choose a reason for hiding this comment

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

What is the net effect here of these network IO changes, for HISPEC? for others?

@mikelangmayr mikelangmayr changed the title [WIP / Research] Autofetch for Hispec ATC [WIP] Autofetch for Hispec ATC Jun 5, 2025
@mikelangmayr mikelangmayr changed the base branch from main to camera_clean June 10, 2025 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants