Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
Lima-camera-frelon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LimaGroup
Lima-camera-frelon
Commits
ef99b990
Commit
ef99b990
authored
Jan 30, 2019
by
Alejandro Homs Puron
Committed by
operator for beamline
Jan 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support SPB8_F16_Dual:
* Include F16ForceSingle to also support a single SPB8
parent
5590fd76
Pipeline
#8010
failed with stages
in 7 minutes and 1 second
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
80 additions
and
26 deletions
+80
-26
include/Frelon.h
include/Frelon.h
+1
-1
include/FrelonGeometry.h
include/FrelonGeometry.h
+3
-6
include/FrelonModel.h
include/FrelonModel.h
+5
-1
python/FrelonAcq.py
python/FrelonAcq.py
+26
-8
sip/Frelon.sip
sip/Frelon.sip
+1
-1
sip/FrelonModel.sip
sip/FrelonModel.sip
+3
-0
src/FrelonCamera.cpp
src/FrelonCamera.cpp
+1
-1
src/FrelonGeometry.cpp
src/FrelonGeometry.cpp
+8
-7
src/FrelonInterface.cpp
src/FrelonInterface.cpp
+9
-0
src/FrelonModel.cpp
src/FrelonModel.cpp
+23
-1
No files found.
include/Frelon.h
View file @
ef99b990
...
...
@@ -164,7 +164,7 @@ enum GeomType {
SPB12_4_Quad
,
Hamamatsu
,
SPB2_F16
,
SPB8_F16_
Half
,
SPB8_F16_
Single
,
SPB8_F16_Dual
,
};
...
...
include/FrelonGeometry.h
View file @
ef99b990
...
...
@@ -111,7 +111,7 @@ class Geometry : public HwMaxImageSizeCallbackGen
protected:
virtual
void
setMaxImageSizeCallbackActive
(
bool
cb_active
);
bool
isFrelon16
(
SPBType
spb_type
);
bool
isFrelon16
();
void
writeRegister
(
Reg
reg
,
int
val
);
void
readRegister
(
Reg
reg
,
int
&
val
);
...
...
@@ -169,12 +169,9 @@ inline bool Geometry::isChanActive(InputChan curr, InputChan chan)
return
(
curr
&
chan
)
==
chan
;
};
inline
bool
Geometry
::
isFrelon16
(
SPBType
spb_type
)
inline
bool
Geometry
::
isFrelon16
()
{
GeomType
geom_type
=
m_model
.
getGeomType
();
return
(((
geom_type
==
SPB2_F16
)
&&
(
spb_type
==
SPBType2
))
||
(((
geom_type
==
SPB8_F16_Half
)
||
(
geom_type
==
SPB8_F16_Dual
))
&&
(
spb_type
==
SPBType8
)));
return
(
m_model
.
getChipType
()
==
Andanta_CcdFT2k
);
}
...
...
include/FrelonModel.h
View file @
ef99b990
...
...
@@ -126,7 +126,10 @@ class Model
void
setCamChar
(
int
cam_char
);
void
getCamChar
(
int
&
cam_char
);
void
setF16ForceSingle
(
bool
f16_force_single
);
void
getF16ForceSingle
(
bool
&
f16_force_single
);
void
reset
();
bool
isValid
();
...
...
@@ -151,6 +154,7 @@ class Model
Firmware
m_firmware
;
int
m_complex_ser_nb
;
int
m_cam_char
;
bool
m_f16_force_single
;
bool
m_valid
;
SPBType
m_spb_type
;
...
...
python/FrelonAcq.py
View file @
ef99b990
...
...
@@ -119,7 +119,11 @@ class FrelonAcq:
@
DEB_MEMBER_FUNCT
def
__init__
(
self
,
espia_dev_nb
):
def
__init__
(
self
,
espia_dev_nb
,
*
args
,
**
kws
):
espia_dev_nb2
=
kws
.
get
(
'espia_dev_nb2'
,
None
)
if
len
(
args
)
>
0
:
espia_dev_nb2
=
args
[
0
]
self
.
m_cam_inited
=
False
self
.
m_e2v_corr
=
None
...
...
@@ -129,11 +133,21 @@ class FrelonAcq:
self
.
m_bpm_mgr
=
Tasks
.
BpmManager
()
self
.
m_bpm_task
=
Tasks
.
BpmTask
(
self
.
m_bpm_mgr
)
self
.
m_edev
=
Espia
.
Dev
(
espia_dev_nb
)
self
.
m_acq
=
Espia
.
Acq
(
self
.
m_edev
)
self
.
m_buffer_cb_mgr
=
Espia
.
BufferMgr
(
self
.
m_acq
)
self
.
m_eserline
=
Espia
.
SerialLine
(
self
.
m_edev
)
self
.
m_ser_edev
=
Espia
.
Dev
(
espia_dev_nb
)
self
.
m_eserline
=
Espia
.
SerialLine
(
self
.
m_ser_edev
)
self
.
m_cam
=
Frelon
.
Camera
(
self
.
m_eserline
)
self
.
m_acq_edev
=
self
.
m_ser_edev
model
=
self
.
m_cam
.
getModel
()
f16
=
(
model
.
getChipType
()
==
Frelon
.
Andanta_CcdFT2k
)
if
f16
:
if
espia_dev_nb2
is
not
None
:
self
.
m_acq_edev
=
Espia
.
Meta
([
espia_dev_nb
,
espia_dev_nb2
])
else
:
model
.
setF16ForceSingle
(
True
);
self
.
m_acq
=
Espia
.
Acq
(
self
.
m_acq_edev
)
self
.
m_buffer_cb_mgr
=
Espia
.
BufferMgr
(
self
.
m_acq
)
self
.
m_buffer_mgr
=
BufferCtrlMgr
(
self
.
m_buffer_cb_mgr
)
self
.
m_hw_inter
=
Frelon
.
Interface
(
self
.
m_acq
,
self
.
m_buffer_mgr
,
self
.
m_cam
)
...
...
@@ -158,7 +172,8 @@ class FrelonAcq:
del
self
.
m_eserline
;
gc
.
collect
()
del
self
.
m_buffer_cb_mgr
;
gc
.
collect
()
del
self
.
m_acq
;
gc
.
collect
()
del
self
.
m_edev
;
gc
.
collect
()
del
self
.
m_acq_edev
;
gc
.
collect
()
del
self
.
m_ser_edev
;
gc
.
collect
()
if
self
.
m_e2v_corr
:
del
self
.
m_e2v_corr_update
...
...
@@ -167,8 +182,11 @@ class FrelonAcq:
del
self
.
m_bpm_task
;
gc
.
collect
()
del
self
.
m_bpm_mgr
;
gc
.
collect
()
def
getEspiaDev
(
self
):
return
self
.
m_edev
def
getEspiaSerDev
(
self
):
return
self
.
m_ser_edev
def
getEspiaAcqDev
(
self
):
return
self
.
m_acq_edev
def
getEspiaAcq
(
self
):
return
self
.
m_acq
...
...
sip/Frelon.sip
View file @
ef99b990
...
...
@@ -171,7 +171,7 @@ enum GeomType {
SPB12_4_Quad,
Hamamatsu,
SPB2_F16,
SPB8_F16_
Half
,
SPB8_F16_
Single
,
SPB8_F16_Dual,
};
...
...
sip/FrelonModel.sip
View file @
ef99b990
...
...
@@ -78,6 +78,9 @@ class Model
void setCamChar(int cam_char);
void getCamChar(int& cam_char /Out/);
void setF16ForceSingle(bool f16_force_single);
void getF16ForceSingle(bool& f16_force_single /Out/);
void reset();
bool isValid();
...
...
src/FrelonCamera.cpp
View file @
ef99b990
...
...
@@ -111,7 +111,7 @@ void Camera::syncRegs()
case
SPB12_4_Quad
:
case
Hamamatsu
:
case
SPB2_F16
:
case
SPB8_F16_
Half
:
case
SPB8_F16_
Single
:
case
SPB8_F16_Dual
:
m_geom
=
new
Geometry
(
*
this
);
break
;
...
...
src/FrelonGeometry.cpp
View file @
ef99b990
...
...
@@ -322,9 +322,10 @@ void Geometry::getMaxFrameDim(FrameDim& max_frame_dim)
ChipType
chip_type
=
m_model
.
getChipType
();
max_frame_dim
=
ChipMaxFrameDimMap
[
chip_type
];
if
(
isFrelon16
(
SPBType2
))
GeomType
geom_type
=
m_model
.
getGeomType
();
if
(
geom_type
==
SPB2_F16
)
max_frame_dim
/=
Point
(
2
,
2
);
else
if
(
isFrelon16
(
SPBType8
)
)
else
if
(
geom_type
==
SPB8_F16_Single
)
max_frame_dim
/=
Point
(
1
,
2
);
DEB_RETURN
()
<<
DEB_VAR1
(
max_frame_dim
);
...
...
@@ -361,7 +362,7 @@ void Geometry::checkFlip(Flip& flip)
{
DEB_MEMBER_FUNCT
();
DEB_PARAM
()
<<
DEB_VAR1
(
flip
);
if
(
isFrelon16
(
SPBType2
)
||
isFrelon16
(
SPBType8
))
{
if
(
isFrelon16
())
{
DEB_TRACE
()
<<
"No flip is supported"
;
flip
=
Flip
(
false
);
}
else
{
...
...
@@ -395,7 +396,7 @@ void Geometry::checkBin(Bin& bin)
DEB_MEMBER_FUNCT
();
DEB_PARAM
()
<<
DEB_VAR1
(
bin
);
bool
frelon16
=
(
isFrelon16
(
SPBType2
)
||
isFrelon16
(
SPBType8
));
bool
frelon16
=
(
isFrelon16
());
int
max_bin_x
=
frelon16
?
1
:
int
(
MaxBinX
);
int
max_bin_y
=
frelon16
?
1
:
int
(
MaxBinY
);
int
bin_x
=
min
(
bin
.
getX
(),
max_bin_x
);
...
...
@@ -494,7 +495,7 @@ Flip Geometry::getMirror()
Flip
mirror
;
mirror
.
x
=
isChanActive
(
curr
,
Chan12
)
||
isChanActive
(
curr
,
Chan34
);
mirror
.
y
=
isChanActive
(
curr
,
Chan13
)
||
isChanActive
(
curr
,
Chan24
);
if
(
isFrelon16
(
SPBType2
)
||
isFrelon16
(
SPBType8
))
if
(
isFrelon16
())
mirror
=
Flip
(
false
);
DEB_RETURN
()
<<
DEB_VAR1
(
mirror
);
return
mirror
;
...
...
@@ -935,7 +936,7 @@ void Geometry::getReadoutTime(double& readout_time)
THROW_HW_ERROR
(
NotSupported
)
<<
"Camera does not have "
<<
"readout time calculation"
;
if
(
isFrelon16
(
SPBType2
)
||
isFrelon16
(
SPBType8
))
{
if
(
isFrelon16
())
{
readout_time
=
100e-3
;
}
else
{
readFloatRegister
(
ReadoutTime
,
readout_time
);
...
...
@@ -951,7 +952,7 @@ void Geometry::getTransferTime(double& xfer_time)
THROW_HW_ERROR
(
NotSupported
)
<<
"Camera does not have "
<<
"shift time calculation"
;
if
(
isFrelon16
(
SPBType2
)
||
isFrelon16
(
SPBType8
))
{
if
(
isFrelon16
())
{
xfer_time
=
100e-3
;
}
else
{
readFloatRegister
(
TransferTime
,
xfer_time
);
...
...
src/FrelonInterface.cpp
View file @
ef99b990
...
...
@@ -811,6 +811,15 @@ Interface::Interface(Espia::Acq& acq, BufferCtrlMgr& buffer_mgr,
{
DEB_CONSTRUCTOR
();
bool
f16_dual
=
(
m_cam
.
getModel
().
getGeomType
()
==
SPB8_F16_Dual
);
if
(
f16_dual
!=
m_acq
.
getDev
().
isMeta
())
THROW_HW_ERROR
(
Error
)
<<
"Frelon16 2xSPB8 / Espia mismatch"
;
Espia
::
SGImgConfig
img_config
=
(
f16_dual
?
Espia
::
SGImgConcatVert2
:
Espia
::
SGImgNorm
);
FrameDim
det_frame_dim
;
m_cam
.
getFrameDim
(
det_frame_dim
);
m_acq
.
setSGImgConfig
(
img_config
,
det_frame_dim
.
getSize
());
m_acq
.
registerAcqEndCallback
(
m_acq_end_cb
);
m_acq
.
registerEventCallback
(
m_event_cb
);
...
...
src/FrelonModel.cpp
View file @
ef99b990
...
...
@@ -139,6 +139,7 @@ void Firmware::checkValid()
}
Model
::
Model
()
:
m_f16_force_single
(
false
)
{
DEB_CONSTRUCTOR
();
...
...
@@ -197,6 +198,22 @@ void Model::getCamChar(int& cam_char)
DEB_RETURN
()
<<
DEB_VAR1
(
DEB_HEX
(
cam_char
));
}
void
Model
::
setF16ForceSingle
(
bool
f16_force_single
)
{
DEB_MEMBER_FUNCT
();
DEB_PARAM
()
<<
DEB_VAR1
(
f16_force_single
);
m_f16_force_single
=
f16_force_single
;
update
();
}
void
Model
::
getF16ForceSingle
(
bool
&
f16_force_single
)
{
DEB_MEMBER_FUNCT
();
f16_force_single
=
m_f16_force_single
;
DEB_RETURN
()
<<
DEB_VAR1
(
f16_force_single
);
}
void
Model
::
reset
()
{
DEB_MEMBER_FUNCT
();
...
...
@@ -204,6 +221,7 @@ void Model::reset()
m_firmware
.
reset
();
m_complex_ser_nb
=
0
;
m_cam_char
=
0
;
update
();
}
...
...
@@ -251,6 +269,10 @@ void Model::update()
if
(
has
(
CamChar
)
&&
m_cam_char
)
{
int
type_bits
=
(
m_cam_char
>>
8
)
&
SPBConXY
;
SPBConType
spb_con_type
=
SPBConType
(
type_bits
);
if
((
spb_con_type
==
SPBConXY
)
&&
m_f16_force_single
)
{
DEB_TRACE
()
<<
"Limiting to single SPB8"
;
spb_con_type
=
SPBConX
;
}
if
(
spb_con_type
!=
SPBConNone
)
m_spb_con_type
=
spb_con_type
;
}
...
...
@@ -367,7 +389,7 @@ GeomType Model::getGeomType()
THROW_HW_ERROR
(
Error
)
<<
"SPB8 only supports Frelon16"
;
SPBConType
spb_con_type
=
getSPBConType
();
bool
dual_spb
=
(
spb_con_type
==
SPBConXY
);
geom_type
=
dual_spb
?
SPB8_F16_Dual
:
SPB8_F16_
Half
;
geom_type
=
dual_spb
?
SPB8_F16_Dual
:
SPB8_F16_
Single
;
}
DEB_RETURN
()
<<
DEB_VAR1
(
geom_type
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment