Skip to content
Merged
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
6 changes: 3 additions & 3 deletions EX01_loadMeasurement.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def run_example_loadMeasurement(
userSettingsDir=loc_settings,
measurementLoc=loc_file):
print("loading user settings...")
settings = cuvis.General(userSettingsDir)
settings.set_log_level("info")
cuvis.init(userSettingsDir)
cuvis.set_log_level("info")

print("loading session...")
session = cuvis.SessionFile(measurementLoc)
Expand Down Expand Up @@ -72,8 +72,8 @@ def run_example_loadMeasurement(
plt.title("Spectrum of {} for x={}, y={}".format(mesu.name, x, y))
plt.show()

cuvis.shutdown()
print("finished.")
pass


if __name__ == "__main__":
Expand Down
7 changes: 3 additions & 4 deletions EX02_reprocessMeasurement.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def run_example_reprocessMeasurement(
distanceLoc=loc_distance,
outDir=loc_output):
print("loading user settings...")
settings = cuvis.General(userSettingsDir)
settings.set_log_level("info")
cuvis.init(userSettingsDir)
cuvis.set_log_level("info")

print("loading measurement file...")
sessionM = cuvis.SessionFile(measurementLoc)
Expand Down Expand Up @@ -107,10 +107,9 @@ def run_example_reprocessMeasurement(
else:
print("Cannot process to {} mode!".format(mode))

cuvis.shutdown()
print("finished.")

pass


if __name__ == "__main__":

Expand Down
7 changes: 4 additions & 3 deletions EX03_exportMeasurement.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def run_example_exportMeasurement(userSettingsDir=loc_settings,
pluginLoc=loc_plugin,
exportDir=loc_output):
print("loading user settings...")
settings = cuvis.General(userSettingsDir)
settings.set_log_level("info")
cuvis.init(userSettingsDir)
cuvis.set_log_level("info")

print("loading session file...")
session = cuvis.SessionFile(measurementLoc)
Expand Down Expand Up @@ -84,7 +84,8 @@ def run_example_exportMeasurement(userSettingsDir=loc_settings,
viewExporter = cuvis.ViewExporter(view_export_settings)
viewExporter.apply(mesu)

pass
cuvis.shutdown()
print("finished.")


if __name__ == "__main__":
Expand Down
8 changes: 4 additions & 4 deletions EX04_changeDistance.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def run_example_changeDistance(userSettingsDir=loc_settings,
distance=loc_distance,
exportDir=loc_output):
print("loading user settings...")
settings = cuvis.General(userSettingsDir)
settings.set_log_level("info")
cuvis.init(userSettingsDir)
cuvis.set_log_level("info")

print("loading session file...")
session = cuvis.SessionFile(measurementLoc)
Expand Down Expand Up @@ -67,10 +67,10 @@ def run_example_changeDistance(userSettingsDir=loc_settings,
print(mesu.distance)
print("saving...")
mesu.save(saveArgs)

cuvis.shutdown()
print("finished.")

pass


if __name__ == "__main__":

Expand Down
7 changes: 3 additions & 4 deletions EX05_recordSingleImages.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def run_example_recordSingleImage(
exposure=loc_exptime,
nrImgs=loc_nimgs):
print("loading user settings...")
settings = cuvis.General(userSettingsDir)
settings.set_log_level("info")
cuvis.init(userSettingsDir)
cuvis.set_log_level("info")

print(
"loading calibration, processing and acquisition context (factory)...")
Expand Down Expand Up @@ -77,10 +77,9 @@ def run_example_recordSingleImage(
else:
print("failed")

cuvis.shutdown()
print("finished.")

pass


if __name__ == "__main__":
print("Example 05: Record single image. Please provide:")
Expand Down
7 changes: 3 additions & 4 deletions EX05_recordSingleImages_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ async def run_example_recordSingleImage(
exposure=loc_exptime,
nrImgs=loc_nimgs):
print("loading user settings...")
settings = cuvis.General(userSettingsDir)
settings.set_log_level("info")
cuvis.init(userSettingsDir)
cuvis.set_log_level("info")

print(
"loading calibration, processing and acquisition context (factory)...")
Expand Down Expand Up @@ -76,10 +76,9 @@ async def run_example_recordSingleImage(
else:
print("failed")

cuvis.shutdown()
print("finished.")

pass


if __name__ == "__main__":
print("Example 05: Record single image. Please provide:")
Expand Down
8 changes: 4 additions & 4 deletions EX06_recordVideo.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def run_example_recordVideo(userSettingsDir=loc_settings,
autoExp=loc_autoexp,
fps=loc_fps):
print("loading user settings...")
settings = cuvis.General(userSettingsDir)
settings.set_log_level("info")
cuvis.init(userSettingsDir)
cuvis.set_log_level("info")

print("loading calibration (factory)...")
calibration = cuvis.Calibration(factoryDir)
Expand Down Expand Up @@ -124,10 +124,10 @@ def run_example_recordVideo(userSettingsDir=loc_settings,

print("acquisition stopped...")
acquisitionContext.set_continuous(False)

cuvis.shutdown()
print("finished.")

pass


if __name__ == "__main__":
print("Example 06: Record video file. Please provide:")
Expand Down
10 changes: 5 additions & 5 deletions EX06_recordVideo_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ async def run_example_recordVideo(userSettingsDir=loc_settings,
autoExp=loc_autoexp,
fps=loc_fps):
print("loading user settings...")
settings = cuvis.General(userSettingsDir)
settings.set_log_level("info")

cuvis.init(userSettingsDir)
cuvis.set_log_level("info")
print("loading calibration (factory)...")
calibration = cuvis.Calibration(factoryDir)

Expand Down Expand Up @@ -122,10 +122,10 @@ async def run_example_recordVideo(userSettingsDir=loc_settings,

print("acquisition stopped...")
await acquisitionContext.set_continuous_async(False)

cuvis.shutdown()
print("finished.")

pass


if __name__ == "__main__":
print("Example 06: Record video file. Please provide:")
Expand Down
8 changes: 4 additions & 4 deletions EX07_recordVideoFromSessionFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def run_example_recordVideoFromSessionFile(userSettingsDir=loc_settings,
autoExp=loc_autoexp,
fps=loc_fps):
print("loading user settings...")
settings = cuvis.General(userSettingsDir)
settings.set_log_level("info")
cuvis.init(userSettingsDir)
cuvis.set_log_level("info")

print("loading session file ...")
session = cuvis.SessionFile(measurementLoc)
Expand Down Expand Up @@ -126,10 +126,10 @@ def run_example_recordVideoFromSessionFile(userSettingsDir=loc_settings,

print("acquisition stopped...")
acquisitionContext.set_continuous(False)

cuvis.shutdown()
print("finished.")

pass


if __name__ == "__main__":
print("Example 07: Record video from session file. Please provide:")
Expand Down