Skip to content
Open
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
2 changes: 2 additions & 0 deletions nottcontrol/camera/scify.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,15 @@ def process_frame(self):

def load_roi_config(self, config):
self.roi_config = []
i = 1
for roi_widget in self.roi_widgets:
try:
roi_config = self.load_roi_from_config(config, roi_widget.name)
except:
print(f'Failed to load roi configuration for {roi_widget.name}, using default')
roi_config = Roi(i*100, 600, 50,50)
roi_widget.setConfig(roi_config)
i += 1

def load_roi_from_config(self, config, adr):
roi_string = config['CAMERA'][adr]
Expand Down
1 change: 1 addition & 0 deletions nottcontrol/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Config:
def __init__(self, path:str):
self._path = path
self.config_parser = ConfigParser()
self.config_parser.optionxform = str # Preserve case sensitivity
self.config_parser.read(path)

def __getitem__(self, key):
Expand Down
14 changes: 14 additions & 0 deletions nottcontrol/lucid/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 17 17:13:16 2025

@author: Thomas
"""

from pathlib import Path
import os
from nottcontrol.config import Config

_parent = Path(__file__).parent
_config_path_lucid = os.path.join(_parent, "cfg/config.cfg")
config_lucid = Config(_config_path_lucid)
114 changes: 114 additions & 0 deletions nottcontrol/lucid/cfg/config.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
[connection]
im_ip = 10.33.179.61
pup_ip = 10.33.179.45

[stream_im]
StreamAutoNegotiatePacketSize = True
StreamPacketResendEnable = True

[stream_pup]
StreamAutoNegotiatePacketSize = True
StreamPacketResendEnable = True

[readout_im]
ExposureAuto = Off
AcquisitionFrameRateEnable = True
AcquisitionFrameRate = 1.4
ExposureTimeSelector = Common
ExposureTime = 56318.0
GainAuto = Off
Gain = 12.0
BlackLevel = 0.0
GammaEnable = True
Gamma = 1.0
Width = 200
Height = 300
OffsetX = 1800
OffsetY = 1000

[readout_pup]
ExposureAuto = Off
AcquisitionFrameRateEnable = True
AcquisitionFrameRate = 0.5
ExposureTimeSelector = Common
ExposureTime = 1959860.944
GainAuto = Off
Gain = 48.0
BlackLevel = 0.0
GammaEnable = True
Gamma = 1.0
Width = 3072
Height = 2048
OffsetX = 0
OffsetY = 0

[fit_pup]
# Standard deviation of Gaussian kernel used for image smoothening
sigma = 50
# Amounts of pixels per bin
mybinx = 4
mybiny = 4
# Percentile thresholds for gradient-based edge detection
perc_grad_low = 80
perc_grad_high = 95
# Percentile threshold for intensity-based filtering of high gradient pixels
perc_int = 80

[fit_im]
# Amount of pixels per bin
mybinx = 2
mybiny = 2
# Percentile thresholds for gradient-based edge detection
perc_grad_low = 99.9
perc_grad_high = 100
# Percentile threshold for intensity-based filtering of high gradient pixels
perc_int = 99.9

[ref_pup]
# (pos_x,pos_y,radius) in px : TO BE COMPLETED
beam1 = (1482,734,621)
beam2 = (1412,718,677)
beam3 = (1474,696,666)
beam4 = (1291,624,696)

[ref_im]
# (pos_x,pos_y,radius) in px : TO BE COMPLETED
beam1 = (92,86,4)
beam2 = (88,136,4)
beam3 = (84,184,5)
beam4 = (76,236,4)

[convert_dict]
im_ip = String
pup_ip = String
StreamAutoNegotiatePacketSize = Bool
StreamPacketResendEnable = Bool
ExposureAuto = String
AcquisitionFrameRateEnable = Bool
AcquisitionFrameRate = Float
ExposureTimeSelector = String
ExposureTime = Float
GainAuto = String
Gain = Float
BlackLevel = Float
GammaEnable = Bool
Gamma = Float
Width = Int
Height = Int
OffsetX = Int
OffsetY = Int
sigma = Int
mybinx = Int
mybiny = Int
perc_grad_low = Float
perc_grad_high = Float
perc_int = Float
N = Int
rfit = Int
beam1 = IntTuple
beam2 = IntTuple
beam3 = IntTuple
beam4 = IntTuple



Loading