Skip to content
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

added SystemSofastFixed #78

Merged
merged 28 commits into from
Apr 17, 2024
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
97b42fb
Renamed SystemSofastFixed to PatternSofastFixed and updated files and…
braden6521 Apr 4, 2024
37b48ec
Added SystemSofastFixed class.
braden6521 Apr 4, 2024
9642447
Added test_SystemSofastFixed unit test and updated ImageAcquisition_n…
braden6521 Apr 4, 2024
0da37ab
Renamed SystemSofastFixed to PatternSofastFixed and updated files and…
braden6521 Apr 4, 2024
e255db5
Added SystemSofastFixed class.
braden6521 Apr 4, 2024
0d0398e
Added test_SystemSofastFixed unit test and updated ImageAcquisition_n…
braden6521 Apr 4, 2024
6847f02
Renamed SystemSofastFixed to PatternSofastFixed and updated files and…
braden6521 Apr 4, 2024
f1d6101
Added SystemSofastFixed class.
braden6521 Apr 4, 2024
d1f8cbb
Added test_SystemSofastFixed unit test and updated ImageAcquisition_n…
braden6521 Apr 4, 2024
1df7a89
Added DistanceOpticScreen to SystemSofastFixed.
braden6521 Apr 9, 2024
a6fed12
Added Singleton/Multidon image acquisition/projection support to Syst…
braden6521 Apr 9, 2024
aeb8d7b
Added sofast command line interface
braden6521 Apr 9, 2024
b62e50a
Added sofast command line interface
braden6521 Apr 9, 2024
beb227a
Added run_next to sofast_cli
braden6521 Apr 9, 2024
6d970a5
Added Fixed functionality to Sofast CLI
braden6521 Apr 9, 2024
db99aea
Removed calibrate camera exposure from SystemSofastFixed
braden6521 Apr 10, 2024
da153ff
Removed debugging lines from sofast CLI. Aded more functionality.
braden6521 Apr 10, 2024
416aa2d
Removed obsolete run_and_characterize sofast scripts.
braden6521 Apr 10, 2024
41d25dc
Updated contrib Sofast readme
braden6521 Apr 10, 2024
48a9b12
Updated SystemSofastFixed unit test.
braden6521 Apr 10, 2024
4e76b7c
Made black happy
braden6521 Apr 10, 2024
0d65611
Changed how SystemSofastFixed closes.
braden6521 Apr 10, 2024
f237d92
Fixed too short of documentation underline
braden6521 Apr 10, 2024
9283b80
Added a shutter delay to testing ImageAcquisition (microseconds)
braden6521 Apr 10, 2024
49b410e
Fixed error with sys_fringe in SofastGUI.py
braden6521 Apr 10, 2024
0aaf42c
Updated Sofast CLI to parameterize all inputs.
braden6521 Apr 17, 2024
b7dc4e4
Fixed typo in SystemSofastFixed
braden6521 Apr 17, 2024
100c83b
Merge branch 'develop' into run_sofast_fixed
braden6521 Apr 17, 2024
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
Prev Previous commit
Next Next commit
Added test_SystemSofastFixed unit test and updated ImageAcquisition_n…
…o_camera.
braden6521 committed Apr 17, 2024
commit d1f8cbb7c3920cbd0014c7b318ed9f6cb34838ef
64 changes: 64 additions & 0 deletions opencsp/app/sofast/test/test_SystemSofastFixed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import unittest
from os.path import join, dirname

import pytest

from opencsp.app.sofast.lib.SystemSofastFixed import SystemSofastFixed
from opencsp.app.sofast.test.ImageAcquisition_no_camera import ImageAcquisition
from opencsp.common.lib.deflectometry.ImageProjection import ImageProjection
from opencsp.common.lib.geometry.Vxy import Vxy
from opencsp.common.lib.geometry.Vxyz import Vxyz
from opencsp.common.lib.opencsp_path.opencsp_root_path import opencsp_code_dir
import opencsp.common.lib.tool.log_tools as lt


class TestSystemSofastFixed(unittest.TestCase):
@pytest.mark.no_xvfb
def test_system(self):
# Get test data location
file_im_proj = join(opencsp_code_dir(), 'test/data/sofast_common/image_projection_test.h5')

# Instantiate image projection class
im_proj = ImageProjection.load_from_hdf_and_display(file_im_proj)

# Instantiate image acquisition class
im_aq = ImageAcquisition()

# Set camera settings
im_aq.frame_size = (100, 80)
im_aq.frame_rate = 7
im_aq.exposure_time = 300000
im_aq.gain = 230

# Create system class
system = SystemSofastFixed(im_proj, im_aq)
system.image_delay = 300
system.image_acquisition.exposure_time = 0.1 # seconds

# Define pattern parameters
system.set_pattern_parameters(5, 5)

# Define functions to put in system queue
funcs = [
system.run_measurement,
system.close_all,
]

# Load function in queue
system.set_queue(funcs)

# Run
system.run()

# Get measurement
v_measure_point_facet = Vxyz((0.0, 0.0, 0.0))
dist_optic_screen = 10.0
origin = Vxy((10, 200))
measurement = system.get_measurement(v_measure_point_facet, dist_optic_screen, origin)


if __name__ == '__main__':
save_dir = join(dirname(__file__), 'data/output')

lt.logger(level=lt.log.DEBUG)
unittest.main()