OSCR

Mechanosensory encoding of surface mechanics optimizes locomotion.

Code ↔ Paper

9 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 9 matches
  1. [1] § Methods › Calcium imaging in freely moving animals › Video processing › Skeletonisation ↔ helpers/skeletonise.py, lines 210–252 · score 0.92 · cv2.findContours, fastNlMeansDenoising, cv2.GaussianBlur, skimage.exposure.rescale_intensity, cv2.threshold, scikit-image
  2. [2] § Methods › Calcium imaging in the microfluidic body wall touch device › Calcium imaging and mechanical stimulation ↔ dcamsdk4/samples/python/dcamapi4.py, lines 222–508 · score 0.69 · master pulse, pre, meter, synchronize, edge, trigger
  3. [3] § Methods › Calcium imaging in the microfluidic body wall touch device › Calcium analysis ↔ helpers/plot_calcium.py, lines 74–101 · score 0.57 · GCamp, tagRFP, timepoint, signals, calcium, frames
  4. [4] § Results › External mechanoreception adjusts proprioceptive feedback ↔ CEresponsefunctions/Model2.m, lines 1–82 · score 0.57 · gap junctions, injected, synaptic, dynamics, connectome, model
  5. [5] § Methods › Calcium imaging in freely moving animals › Time-series analysis ↔ STEP3_correlate_behaviour_activity.py, lines 23–76 · score 0.54 · normal components, subtracted, correlate, tangential, skeleton, activity
  6. [6] § Methods › Calcium imaging in freely moving animals › Automatic worm tracking, Napari-based plugin Track-live ↔ main.py, lines 136–168 · score 0.54 · Track live, Napari, button, pressed
  7. [7] § Results › External mechanoreception adjusts proprioceptive feedback ↔ simulateNetwork.m, lines 1–102 · score 0.50 · motor neuron voltage, chemical, network, synapses, amplitudes, vectors
  8. [8] § Methods › Molecular biology, transgenesis and genome editing › mec-4::active aptazyme (AZ) ↔ dcamsdk4/samples/python/dcamapi4.py, lines 222–508 · score 0.50 · Hot, active, confocal, temperature, double, filter
  9. [9] § Methods › Calcium imaging in the microfluidic body wall touch device › Calcium imaging and mechanical stimulation ↔ dcamsdk4/inc/dcamprop.h, lines 582–653 · score 0.50 · master pulse, pre, trigger, connected, exposure, channel

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Python · 1,352 lines · 53 KB · no license · 2 matches

  1. # dcamapi4.py : Dec 16, 2022
  2. #
  3. # Copyright (C) 2021-2022 Hamamatsu Photonics K.K.. All right reserved.
  4. import platform
  5. from enum import IntEnum
  6. from ctypes import *
  7. # ==== load shared library ====
  8. # abosorb platform dependency
  9. __platform_system = platform.system()
  10. if __platform_system == 'Windows':
  11. __dll = windll.LoadLibrary('dcamapi.dll')
  12. else: # Linux
  13. __dll = cdll.LoadLibrary('/usr/local/lib/libdcamapi.so')
  14. # ==== declare constants ====
  15. class DCAMERR(IntEnum):
  16. # status error
  17. BUSY = -2147483391 # 0x80000101, API cannot process in busy state.
  18. NOTREADY = -2147483389 # 0x80000103, API requires ready state.
  19. NOTSTABLE = -2147483388 # 0x80000104, API requires stable or unstable state.
  20. UNSTABLE = -2147483387 # 0x80000105, API does not support in unstable state.
  21. NOTBUSY = -2147483385 # 0x80000107, API requires busy state.
  22. EXCLUDED = -2147483376 # 0x80000110, some resource is exclusive and already used
  23. COOLINGTROUBLE = -2147482878 # 0x80000302, something happens near cooler
  24. NOTRIGGER = -2147482877 # 0x80000303, no trigger when necessary. Some camera supports this error.
  25. TEMPERATURE_TROUBLE = -2147482876 # 0x80000304, camera warns its temperature
  26. TOOFREQUENTTRIGGER = -2147482875 # 0x80000305, input too frequent trigger. Some camera supports this error.
  27. # wait error
  28. ABORT = -2147483390 # 0x80000102, abort process
  29. TIMEOUT = -2147483386 # 0x80000106, timeout
  30. LOSTFRAME = -2147482879 # 0x80000301, frame data is lost
  31. MISSINGFRAME_TROUBLE = -2147479802 # 0x80000f06, frame is lost but reason is low lever driver's bug
  32. INVALIDIMAGE = -2147482847 # 0x80000321, hpk format data is invalid data
  33. # initialization error
  34. NORESOURCE = -2147483135 # 0x80000201, not enough resource except memory
  35. NOMEMORY = -2147483133 # 0x80000203, not enough memory
  36. NOMODULE = -2147483132 # 0x80000204, no sub module
  37. NODRIVER = -2147483131 # 0x80000205, no driver
  38. NOCAMERA = -2147483130 # 0x80000206, no camera
  39. NOGRABBER = -2147483129 # 0x80000207, no grabber
  40. NOCOMBINATION = -2147483128 # 0x80000208, no combination on registry
  41. FAILOPEN = -2147479551 # 0x80001001, DEPRECATED
  42. FRAMEGRABBER_NEEDS_FIRMWAREUPDATE = -2147479550 # 0x80001002, need to update frame grabber firmware to use the camera
  43. INVALIDMODULE = -2147483119 # 0x80000211, dcam_init() found invalid module
  44. INVALIDCOMMPORT = -2147483118 # 0x80000212, invalid serial port
  45. FAILOPENBUS = -2130702335 # 0x81001001, the bus or driver are not available
  46. FAILOPENCAMERA = -2113925119 # 0x82001001, camera report error during opening
  47. DEVICEPROBLEM = -2113925118 # 0x82001002, initialization failed(for maico)
  48. # calling error
  49. INVALIDCAMERA = -2147481594 # 0x80000806, invalid camera
  50. INVALIDHANDLE = -2147481593 # 0x80000807, invalid camera handle
  51. INVALIDPARAM = -2147481592 # 0x80000808, invalid parameter
  52. INVALIDVALUE = -2147481567 # 0x80000821, invalid property value
  53. OUTOFRANGE = -2147481566 # 0x80000822, value is out of range
  54. NOTWRITABLE = -2147481565 # 0x80000823, the property is not writable
  55. NOTREADABLE = -2147481564 # 0x80000824, the property is not readable
  56. INVALIDPROPERTYID = -2147481563 # 0x80000825, the property id is invalid
  57. NEWAPIREQUIRED = -2147481562 # 0x80000826, old API cannot present the value because only new API need to be used
  58. WRONGHANDSHAKE = -2147481561 # 0x80000827, this error happens DCAM get error code from camera unexpectedly
  59. NOPROPERTY = -2147481560 # 0x80000828, there is no altenative or influence id, or no more property id
  60. INVALIDCHANNEL = -2147481559 # 0x80000829, the property id specifies channel but channel is invalid
  61. INVALIDVIEW = -2147481558 # 0x8000082a, the property id specifies channel but channel is invalid
  62. INVALIDSUBARRAY = -2147481557 # 0x8000082b, the combination of subarray values are invalid. e.g. DCAM_IDPROP_SUBARRAYHPOS + DCAM_IDPROP_SUBARRAYHSIZE is greater than the number of horizontal pixel of sensor.
  63. ACCESSDENY = -2147481556 # 0x8000082c, the property cannot access during this DCAM STATUS
  64. NOVALUETEXT = -2147481555 # 0x8000082d, the property does not have value text
  65. WRONGPROPERTYVALUE = -2147481554 # 0x8000082e, at least one property value is wrong
  66. DISHARMONY = -2147481552 # 0x80000830, the paired camera does not have same parameter
  67. FRAMEBUNDLESHOULDBEOFF = -2147481550 # 0x80000832, framebundle mode should be OFF under current property settings
  68. INVALIDFRAMEINDEX = -2147481549 # 0x80000833, the frame index is invalid
  69. INVALIDSESSIONINDEX = -2147481548 # 0x80000834, the session index is invalid
  70. NOCORRECTIONDATA = -2147481544 # 0x80000838, not take the dark and shading correction data yet.
  71. CHANNELDEPENDENTVALUE = -2147481543 # 0x80000839, each channel has own property value so can't return overall property value.
  72. VIEWDEPENDENTVALUE = -2147481542 # 0x8000083a, each view has own property value so can't return overall property value.
  73. NODEVICEBUFFER = -2147481541 # 0x8000083b, the frame count is larger than device momory size on using device memory.
  74. REQUIREDSNAP = -2147481540 # 0x8000083c, the capture mode is sequence on using device memory.
  75. LESSSYSTEMMEMORY = -2147481537 # 0x8000083f, the sysmte memory size is too small. PC doesn't have enough memory or is limited memory by 32bit OS.
  76. NOTSUPPORT = -2147479805 # 0x80000f03, camera does not support the function or property with current settings
  77. # camera or bus trouble
  78. FAILREADCAMERA = -2097147902 # 0x83001002, failed to read data from camera
  79. FAILWRITECAMERA = -2097147901 # 0x83001003, failed to write data to the camera
  80. CONFLICTCOMMPORT = -2097147900 # 0x83001004, conflict the com port name user set
  81. OPTICS_UNPLUGGED = -2097147899 # 0x83001005, Optics part is unplugged so please check it.
  82. FAILCALIBRATION = -2097147898 # 0x83001006, fail calibration
  83. MISMATCH_CONFIGURATION = -2097147887 # 0x83001011, mismatch between camera output(connection) and frame grabber specs
  84. # 0x84000100 - 0x840001FF, DCAMERR_INVALIDMEMBER_x
  85. INVALIDMEMBER_3 = -2080374525 # 0x84000103, 3th member variable is invalid value
  86. INVALIDMEMBER_5 = -2080374523 # 0x84000105, 5th member variable is invalid value
  87. INVALIDMEMBER_7 = -2080374521 # 0x84000107, 7th member variable is invalid value
  88. INVALIDMEMBER_8 = -2080374520 # 0x84000108, 7th member variable is invalid value
  89. INVALIDMEMBER_9 = -2080374519 # 0x84000109, 9th member variable is invalid value
  90. FAILEDOPENRECFILE = -2080370687 # 0x84001001, DCAMREC failed to open the file
  91. INVALIDRECHANDLE = -2080370686 # 0x84001002, DCAMREC is invalid handle
  92. FAILEDWRITEDATA = -2080370685 # 0x84001003, DCAMREC failed to write the data
  93. FAILEDREADDATA = -2080370684 # 0x84001004, DCAMREC failed to read the data
  94. NOWRECORDING = -2080370683 # 0x84001005, DCAMREC is recording data now
  95. WRITEFULL = -2080370682 # 0x84001006, DCAMREC writes full frame of the session
  96. ALREADYOCCUPIED = -2080370681 # 0x84001007, DCAMREC handle is already occupied by other HDCAM
  97. TOOLARGEUSERDATASIZE = -2080370680 # 0x84001008, DCAMREC is set the large value to user data size
  98. INVALIDWAITHANDLE = -2080366591 # 0x84002001, DCAMWAIT is invalid handle
  99. NEWRUNTIMEREQUIRED = -2080366590 # 0x84002002, DCAM Module Version is older than the version that the camera requests
  100. VERSIONMISMATCH = -2080366589 # 0x84002003, Camre returns the error on setting parameter to limit version
  101. RUNAS_FACTORYMODE = -2080366588 # 0x84002004, Camera is running as a factory mode
  102. IMAGE_UNKNOWNSIGNATURE = -2080362495 # 0x84003001, sigunature of image header is unknown or corrupted
  103. IMAGE_NEWRUNTIMEREQUIRED = -2080362494 # 0x84003002, version of image header is newer than version that used DCAM supports
  104. IMAGE_ERRORSTATUSEXIST = -2080362493 # 0x84003003, image header stands error status
  105. IMAGE_HEADERCORRUPTED = -2080358396 # 0x84004004, image header value is strange
  106. IMAGE_BROKENCONTENT = -2080358395 # 0x84004005, image content is corrupted
  107. # calling error for DCAM-API 2.1.3
  108. UNKNOWNMSGID = -2147481599 # 0x80000801, unknown message id
  109. UNKNOWNSTRID = -2147481598 # 0x80000802, unknown string id
  110. UNKNOWNPARAMID = -2147481597 # 0x80000803, unkown parameter id
  111. UNKNOWNBITSTYPE = -2147481596 # 0x80000804, unknown bitmap bits type
  112. UNKNOWNDATATYPE = -2147481595 # 0x80000805, unknown frame data type
  113. # internal error
  114. NONE = 0 # 0, no error, nothing to have done
  115. INSTALLATIONINPROGRESS = -2147479808 # 0x80000f00, installation progress
  116. UNREACH = -2147479807 # 0x80000f01, internal error
  117. UNLOADED = -2147479804 # 0x80000f04, calling after process terminated
  118. THRUADAPTER = -2147479803 # 0x80000f05
  119. NOCONNECTION = -2147479801 # 0x80000f07, HDCAM lost connection to camera
  120. NOTIMPLEMENT = -2147479806 # 0x80000f02, not yet implementation
  121. DELAYEDFRAME = -2147479799 # 0x80000f09, the frame waiting re-load from hardware buffer with SNAPSHOT of DEVICEBUFFER MODE
  122. DEVICEINITIALIZING = -1342177279 # 0xb0000001
  123. APIINIT_INITOPTIONBYTES = -1543438333 # 0xa4010003, DCAMAPI_INIT::initoptionbytes is invalid
  124. APIINIT_INITOPTION = -1543438332 # 0xa4010004, DCAMAPI_INIT::initoption is invalid
  125. INITOPTION_COLLISION_BASE = -1543389184 # 0xa401C000
  126. INITOPTION_COLLISION_MAX = -1543372801 # 0xa401FFFF
  127. # Between DCAMERR_INITOPTION_COLLISION_BASE and DCAMERR_INITOPTION_COLLISION_MAX means there is collision with initoption in DCAMAPI_INIT.
  128. # The value "(error code) - DCAMERR_INITOPTION_COLLISION_BASE" indicates the index which second INITOPTION group happens.
  129. MISSPROP_TRIGGERSOURCE = -535822064 # 0xE0100110, the trigger mode is internal or syncreadout on using device memory.
  130. # success
  131. SUCCESS = 1 # 1, no error, general success code, app should check the value is positive
  132. ALREADYINITIALIZED = -520093695 # 0xE1000001
  133. ALREADYOPENED = -520093694 # 0xE1000002
  134. INVALIDPIXELTYPE = -520093440 # 0xE1000100
  135. SUCCESS_PROP_GETATTR = 88 # dcamprop_getattr() returns this value at SUCCESS
  136. def is_failed(self):
  137. return True if int(self) < 0 else False
  138. def is_timeout(self):
  139. return True if int(self) == DCAMERR.TIMEOUT else False
  140. class DCAM_PIXELTYPE(IntEnum):
  141. NONE = 0 # no pixeltype specified
  142. MONO8 = 1 # B/W 8 bit
  143. MONO16 = 2 # B/W 16 bit
  144. class DCAMCAP_STATUS(IntEnum):
  145. ERROR = 0x0000
  146. BUSY = 0x0001
  147. READY = 0x0002
  148. STABLE = 0x0003
  149. UNSTABLE = 0x0004
  150. class DCAMWAIT_CAPEVENT(IntEnum):
  151. TRANSFERRED = 0x0001
  152. FRAMEREADY = 0x0002
  153. CYCLEEND = 0x0004
  154. EXPOSUREEND = 0x0008
  155. STOPPED = 0x0010
  156. class DCAMWAIT_RECEVENT(IntEnum):
  157. STOPPED = 0x0100
  158. WARNING = 0x0200
  159. MISSED = 0x0400
  160. DISKFULL = 0x1000
  161. WRITEFAULT = 0x2000
  162. SKIPPED = 0x4000
  163. class DCAMCAP_START(IntEnum):
  164. SEQUENCE = -1
  165. SNAP = 0
  166. class DCAM_IDSTR(IntEnum):
  167. BUS = 0x04000101
  168. CAMERAID = 0x04000102
  169. VENDOR = 0x04000103
  170. MODEL = 0x04000104
  171. CAMERAVERSION = 0x04000105
  172. DRIVERVERSION = 0x04000106
  173. MODULEVERSION = 0x04000107
  174. DCAMAPIVERSION = 0x04000108
  175. CAMERA_SERIESNAME = 0x0400012c
  176. class DCAMAPI_INITOPTION(IntEnum):
  177. """
  178. Initialize parameter.
  179. """
  180. APIVER__LATEST = 0x00000001
  181. APIVER__4_0 = 0x00000400
  182. ENDMARK = 0x00000000
  183. class DCAM_CODEPAGE(IntEnum):
  184. SHIFT_JIS = 932 # Shift JIS
  185. UTF16_LE = 1200 # UTF-16 (Little Endian)
  186. UTF16_BE = 1201 # UTF-16 (Big Endian)
  187. UTF7 = 65000 # UTF-7 translation
  188. UTF8 = 65001 # UTF-8 translation
  189. NONE = 0
  190. class DCAM_IDPROP(IntEnum):
  191. # 0x00000000 - 0x00100000, reserved
  192. # Group: TIMING
  193. TRIGGERSOURCE = 1048848 # 0x00100110, R/W, mode, "TRIGGER SOURCE"
  194. TRIGGERACTIVE = 1048864 # 0x00100120, R/W, mode, "TRIGGER ACTIVE"
  195. TRIGGER_MODE = 1049104 # 0x00100210, R/W, mode, "TRIGGER MODE"
  196. TRIGGERPOLARITY = 1049120 # 0x00100220, R/W, mode, "TRIGGER POLARITY"
  197. TRIGGER_CONNECTOR = 1049136 # 0x00100230, R/W, mode, "TRIGGER CONNECTOR"
  198. TRIGGERTIMES = 1049152 # 0x00100240, R/W, long, "TRIGGER TIMES"
  199. # 0x00100250 is reserved
  200. TRIGGERDELAY = 1049184 # 0x00100260, R/W, sec, "TRIGGER DELAY"
  201. INTERNALTRIGGER_HANDLING = 1049200 # 0x00100270
  202. TRIGGERMULTIFRAME_COUNT = 1049216 # 0x00100280
  203. SYNCREADOUT_SYSTEMBLANK = 1049232 # 0x00100290, R/W, mode, "SYNC READOUT SYSTEM BLANK"
  204. TRIGGERENABLE_ACTIVE = 1049616 # 0x00100410, R/W, mode, "TRIGGER ENABLE ACTIVE"
  205. TRIGGERENABLE_POLARITY = 1049632 # 0x00100420
  206. TRIGGERNUMBER_FORFIRSTIMAGE = 1050640 # 0x00100810, R/O, long, "TRIGGER NUMBER FOR FIRST IMAGE"
  207. TRIGGERNUMBER_FORNEXTIMAGE = 1050656 # 0x00100820, R/O, long, "TRIGGER NUMBER FOR NEXT IMAGE"
  208. NUMBEROF_OUTPUTTRIGGERCONNECTOR = 1835024 # 0x001C0010
  209. OUTPUTTRIGGER_CHANNELSYNC = 1835056 # 0x001C0030, R/W, mode, "OUTPUT TRIGGER CHANNEL SYNC"
  210. OUTPUTTRIGGER_PROGRAMABLESTART = 1835088 # 0x001C0050, R/W, mode, "OUTPUT TRIGGER PROGRAMABLE START"
  211. OUTPUTTRIGGER_SOURCE = 1835280 # 0x001C0110, R/W, mode, "OUTPUT TRIGGER SOURCE"
  212. OUTPUTTRIGGER_POLARITY = 1835296 # 0x001C0120, R/W, mode, "OUTPUT TRIGGER POLARITY"
  213. OUTPUTTRIGGER_ACTIVE = 1835312 # 0x001C0130, R/W, mode, "OUTPUT TRIGGER ACTIVE"
  214. OUTPUTTRIGGER_DELAY = 1835328 # 0x001C0140, R/W, sec, "OUTPUT TRIGGER DELAY"
  215. OUTPUTTRIGGER_PERIOD = 1835344 # 0x001C0150, R/W, sec, "OUTPUT TRIGGER PERIOD"
  216. OUTPUTTRIGGER_KIND = 1835360 # 0x001C0160, R/W, mode, "OUTPUT TRIGGER KIND"
  217. OUTPUTTRIGGER_BASESENSOR = 1835376 # 0x001C0170, R/W, mode, "OUTPUT TRIGGER BASE SENSOR"
  218. OUTPUTTRIGGER_PREHSYNCCOUNT = 1835408 # 0x001C0190, R/W, mode, "OUTPUT TRIGGER PRE HSYNC COUNT"
  219. # - 0x001C10FF for 16 output trigger connector, reserved
  220. _OUTPUTTRIGGER = 256 # 0x00000100, the offset of ID for Nth OUTPUT TRIGGER parameter
  221. MASTERPULSE_MODE = 1966112 # 0x001E0020, R/W, mode, "MASTER PULSE MODE"
  222. MASTERPULSE_TRIGGERSOURCE = 1966128 # 0x001E0030, R/W, mode, "MASTER PULSE TRIGGER SOURCE"
  223. MASTERPULSE_INTERVAL = 1966144 # 0x001E0040, R/W, sec, "MASTER PULSE INTERVAL"
  224. MASTERPULSE_BURSTTIMES = 1966160 # 0x001E0050, R/W, long, "MASTER PULSE BURST TIMES"
  225. # Group: FEATURE
  226. # exposure period
  227. EXPOSURETIME = 2031888 # 0x001F0110, R/W, sec, "EXPOSURE TIME"
  228. EXPOSURETIME_CONTROL = 2031920 # 0x001F0130, R/W, mode, "EXPOSURE TIME CONTROL"
  229. TRIGGER_FIRSTEXPOSURE = 2032128 # 0x001F0200, R/W, mode, "TRIGGER FIRST EXPOSURE"
  230. TRIGGER_GLOBALEXPOSURE = 2032384 # 0x001F0300, R/W, mode, "TRIGGER GLOBAL EXPOSURE"
  231. FIRSTTRIGGER_BEHAVIOR = 2032400 # 0x001F0310, R/W, mode, "FIRST TRIGGER BEHAVIOR"
  232. MULTIFRAME_EXPOSURE = 2035712 # 0x001F1000, R/W, sec, "MULTI FRAME EXPOSURE TIME"
  233. # - 0x001F1FFF for 256 MULTI FRAME
  234. _MULTIFRAME = 16 # 0x00000010, the offset of ID for Nth MULTIFRAME
  235. # anti-blooming
  236. LIGHTMODE = 2097424 # 0x00200110, R/W, mode, "LIGHT MODE"
  237. # 0x00200120 is reserved
  238. # sensitivity
  239. SENSITIVITYMODE = 2097680 # 0x00200210, R/W, mode, "SENSITIVITY MODE"
  240. SENSITIVITY = 2097696 # 0x00200220, R/W, long, "SENSITIVITY"
  241. DIRECTEMGAIN_MODE = 2097744 # 0x00200250, R/W, mode, "DIRECT EM GAIN MODE"
  242. EMGAINWARNING_STATUS = 2097760 # 0x00200260
  243. EMGAINWARNING_LEVEL = 2097776 # 0x00200270, R/W, long, "EM GAIN WARNING LEVEL"
  244. EMGAINWARNING_ALARM = 2097792 # 0x00200280, R/W, mode, "EM GAIN WARNING ALARM"
  245. EMGAINPROTECT_MODE = 2097808 # 0x00200290, R/W, mode, "EM GAIN PROTECT MODE"
  246. EMGAINPROTECT_AFTERFRAMES = 2097824 # 0x002002A0, R/W, long, "EM GAIN PROTECT AFTER FRAMES"
  247. MEASURED_SENSITIVITY = 2097840 # 0x002002B0, R/O, real, "MEASURED SENSITIVITY"
  248. PHOTONIMAGINGMODE = 2097904 # 0x002002F0, R/W, mode, "PHOTON IMAGING MODE"
  249. # sensor cooler
  250. SENSORTEMPERATURE = 2097936 # 0x00200310, R/O, celsius,"SENSOR TEMPERATURE"
  251. SENSORCOOLER = 2097952 # 0x00200320, R/W, mode, "SENSOR COOLER"
  252. SENSORTEMPERATURETARGET = 2097968 # 0x00200330, R/W, celsius,"SENSOR TEMPERATURE TARGET"
  253. SENSORCOOLERSTATUS = 2097984 # 0x00200340, R/O, mode, "SENSOR COOLER STATUS"
  254. SENSORCOOLERFAN = 2098000 # 0x00200350, R/W, mode, "SENSOR COOLER FAN"
  255. SENSORTEMPERATURE_AVE = 2098016 # 0x00200360, R/O, celsius,"SENSOR TEMPERATURE AVE"
  256. SENSORTEMPERATURE_MIN = 2098032 # 0x00200370, R/O, celsius,"SENSOR TEMPERATURE MIN"
  257. SENSORTEMPERATURE_MAX = 2098048 # 0x00200380, R/O, celsius,"SENSOR TEMPERATURE MAX"
  258. SENSORTEMPERATURE_STATUS = 2098064 # 0x00200390, R/O, mode, "SENSOR TEMPERATURE STATUS"
  259. SENSORTEMPERATURE_PROTECT = 2098176 # 0x00200400, R/W, mode, "SENSOR TEMPERATURE MODE"
  260. # mechanical shutter
  261. MECHANICALSHUTTER = 2098192 # 0x00200410, R/W, mode, "MECHANICAL SHUTTER"
  262. # contrast enhance
  263. CONTRASTGAIN = 3146016 # 0x00300120, R/W, long, "CONTRAST GAIN"
  264. CONTRASTOFFSET = 3146032 # 0x00300130, R/W, long, "CONTRAST OFFSET"
  265. # 0x00300140 is reserved
  266. HIGHDYNAMICRANGE_MODE = 3146064 # 0x00300150, R/W, mode, "HIGH DYNAMIC RANGE MODE"
  267. DIRECTGAIN_MODE = 3146080 # 0x00300160, R/W, mode, "DIRECT GAIN MODE"
  268. REALTIMEGAINCORRECT_MODE = 3146096 # 0x00300170, R/W, mode, "REALTIME GAIN CORRECT MODE"
  269. REALTIMEGAINCORRECT_LEVEL = 3146112 # 0x00300180, R/W, mode, "REALTIME GAIN CORRECT LEVEL"
  270. REALTIMEGAINCORRECT_INTERVAL = 3146128 # 0x00300190, R/W, mode, "REALTIME GAIN CORRECT INTERVAL"
  271. NUMBEROF_REALTIMEGAINCORRECTREGION = 3146144 # 0x003001A0
  272. # color features
  273. VIVIDCOLOR = 3146240 # 0x00300200, R/W, mode, "VIVID COLOR"
  274. WHITEBALANCEMODE = 3146256 # 0x00300210, R/W, mode, "WHITEBALANCE MODE"
  275. WHITEBALANCETEMPERATURE = 3146272 # 0x00300220, R/W, color-temp., "WHITEBALANCE TEMPERATURE"
  276. WHITEBALANCEUSERPRESET = 3146288 # 0x00300230, R/W, long, "WHITEBALANCE USER PRESET"
  277. # 0x00300310 is reserved
  278. REALTIMEGAINCORRECTREGION_HPOS = 3149824 # 0x00301000, R/W, long, "REALTIME GAIN CORRECT REGION HPOS"
  279. REALTIMEGAINCORRECTREGION_HSIZE = 3153920 # 0x00302000, R/W, long, "REALTIME GAIN CORRECT REGION HSIZE"
  280. _REALTIMEGAINCORRECTIONREGION = 16 # 0x00000010, the offset of ID for Nth REALTIME GAIN CORRECT REGION parameter
  281. # Group: ALU
  282. # ALU
  283. INTERFRAMEALU_ENABLE = 3670032 # 0x00380010, R/W, mode, "INTERFRAME ALU ENABLE"
  284. RECURSIVEFILTER = 3670288 # 0x00380110, R/W, mode, "RECURSIVE FILTER"
  285. RECURSIVEFILTERFRAMES = 3670304 # 0x00380120
  286. SPOTNOISEREDUCER = 3670320 # 0x00380130, R/W, mode, "SPOT NOISE REDUCER"
  287. SUBTRACT = 3670544 # 0x00380210, R/W, mode, "SUBTRACT"
  288. SUBTRACTIMAGEMEMORY = 3670560 # 0x00380220, R/W, mode, "SUBTRACT IMAGE MEMORY"
  289. STORESUBTRACTIMAGETOMEMORY = 3670576 # 0x00380230, W/O, mode, "STORE SUBTRACT IMAGE TO MEMORY"
  290. SUBTRACTOFFSET = 3670592 # 0x00380240, R/W, long "SUBTRACT OFFSET"
  291. DARKCALIB_STABLEMAXINTENSITY = 3670608 # 0x00380250, R/W, long, "DARKCALIB STABLE MAX INTENSITY"
  292. SUBTRACT_DATASTATUS = 3670768 # 0x003802F0, R/W mode, "SUBTRACT DATA STATUS"
  293. SHADINGCALIB_DATASTATUS = 3670784 # 0x00380300, R/W mode, "SHADING CALIB DATA STATUS"
  294. SHADINGCORRECTION = 3670800 # 0x00380310, R/W, mode, "SHADING CORRECTION"
  295. SHADINGCALIBDATAMEMORY = 3670816 # 0x00380320, R/W, mode, "SHADING CALIB DATA MEMORY"
  296. STORESHADINGCALIBDATATOMEMORY = 3670832 # 0x00380330, W/O, mode, "STORE SHADING DATA TO MEMORY"
  297. SHADINGCALIB_METHOD = 3670848 # 0x00380340, R/W, mode, "SHADING CALIB METHOD"
  298. SHADINGCALIB_TARGET = 3670864 # 0x00380350, R/W, long, "SHADING CALIB TARGET"
  299. SHADINGCALIB_STABLEMININTENSITY = 3670880 # 0x00380360, R/W, long, "SHADING CALIB STABLE MIN INTENSITY"
  300. SHADINGCALIB_SAMPLES = 3670896 # 0x00380370, R/W, long, "SHADING CALIB SAMPLES"
  301. SHADINGCALIB_STABLESAMPLES = 3670912 # 0x00380380, R/W, long, "SHADING CALIB STABLE SAMPLES"
  302. SHADINGCALIB_STABLEMAXERRORPERCENT = 3670928 # 0x00380390, R/W, long, "SHADING CALIB STABLE MAX ERROR PERCENT"
  303. FRAMEAVERAGINGMODE = 3670944 # 0x003803A0, R/W, mode, "FRAME AVERAGING MODE"
  304. FRAMEAVERAGINGFRAMES = 3670960 # 0x003803B0
  305. DARKCALIB_STABLESAMPLES = 3670976 # 0x003803C0, R/W, long, "DARKCALIB STABLE SAMPLES"
  306. DARKCALIB_SAMPLES = 3670992 # 0x003803D0, R/W, long, "DARKCALIB SAMPLES"
  307. DARKCALIB_TARGET = 3671008 # 0x003803E0, R/W, long, "DARKCALIB TARGET"
  308. CAPTUREMODE = 3671056 # 0x00380410, R/W, mode, "CAPTURE MODE"
  309. LINEAVERAGING = 3671120 # 0x00380450, R/W, long, "LINE AVERAGING"
  310. IMAGEFILTER = 3671136 # 0x00380460, R/W, mode, "IMAGE FILTER"
  311. INTENSITYLUT_MODE = 3671312 # 0x00380510, R/W, mode, "INTENSITY LUT MODE"
  312. INTENSITYLUT_PAGE = 3671328 # 0x00380520, R/W, long, "INTENSITY LUT PAGE"
  313. INTENSITYLUT_WHITECLIP = 3671344 # 0x00380530, R/W, long, "INTENSITY LUT WHITE CLIP"
  314. INTENSITYLUT_BLACKCLIP = 3671360 # 0x00380540, R/W, long, "INTENSITY LUT BLACK CLIP"
  315. INTENSITY_GAMMA = 3671392 # 0x00380560, R/W, real, "INTENSITY GAMMA"
  316. SENSORGAPCORRECT_MODE = 3671584 # 0x00380620, R/W, long, "SENSOR GAP CORRECT MODE"
  317. ADVANCEDEDGEENHANCEMENT_MODE = 3671600 # 0x00380630, R/W, mode, "ADVANCED EDGE ENHANCEMENT MODE"
  318. ADVANCEDEDGEENHANCEMENT_LEVEL = 3671616 # 0x00380640, R/W, long, "ADVANCED EDGE ENHANCEMENT LEVEL"
  319. # TAP CALIBRATION
  320. TAPGAINCALIB_METHOD = 3673872 # 0x00380F10, R/W, mode, "TAP GAIN CALIB METHOD"
  321. TAPCALIB_BASEDATAMEMORY = 3673888 # 0x00380F20
  322. STORETAPCALIBDATATOMEMORY = 3673904 # 0x00380F30
  323. TAPCALIBDATAMEMORY = 3673920 # 0x00380F40, W/O, mode, "TAP CALIB DATA MEMORY"
  324. NUMBEROF_TAPCALIB = 3674096 # 0x00380FF0, R/W, long, "NUMBER OF TAP CALIB"
  325. TAPCALIB_GAIN = 3674112 # 0x00381000, R/W, mode, "TAP CALIB GAIN"
  326. TAPCALIB_OFFSET = 3678208 # 0x00382000, R/W, mode, "TAP CALIB OFFSET"
  327. _TAPCALIB = 16 # 0x00000010, the offset of ID for Nth TAPCALIB
  328. # Group: READOUT
  329. # readout speed
  330. READOUTSPEED = 4194576 # 0x00400110, R/W, long, "READOUT SPEED"
  331. # 0x00400120 is reserved
  332. READOUT_DIRECTION = 4194608 # 0x00400130, R/W, mode, "READOUT DIRECTION"
  333. READOUT_UNIT = 4194624 # 0x00400140, R/O, mode, "READOUT UNIT"
  334. SHUTTER_MODE = 4194640 # 0x00400150, R/W, mode, "SHUTTER MODE"
  335. # sensor mode
  336. SENSORMODE = 4194832 # 0x00400210, R/W, mode, "SENSOR MODE"
  337. SENSORMODE_LINEBUNDLEHEIGHT = 4194896 # 0x00400250, R/W, long, "SENSOR MODE LINE BUNDLEHEIGHT"
  338. SENSORMODE_PANORAMICSTARTV = 4194944 # 0x00400280, R/W, long, "SENSOR MODE PANORAMIC START V"
  339. # other readout mode
  340. CCDMODE = 4195088 # 0x00400310, R/W, mode, "CCD MODE"
  341. EMCCD_CALIBRATIONMODE = 4195104 # 0x00400320, R/W, mode, "EM CCD CALIBRATION MODE"
  342. CMOSMODE = 4195152 # 0x00400350, R/W, mode, "CMOS MODE"
  343. MULTILINESENSOR_READOUTMODE = 4195200 # 0x00400380, R/W, mode, "MULTI LINE SENSOR READOUT MODE"
  344. MULTILINESENSOR_TOP = 4195216 # 0x00400390, R/W, long, "MULTI LINE SENSOR TOP"
  345. MULTILINESENSOR_HEIGHT = 4195232 # 0x004003A0, R/W, long, "MULTI LINE SENSOR HEIGHT"
  346. # output mode
  347. OUTPUT_INTENSITY = 4195344 # 0x00400410, R/W, mode, "OUTPUT INTENSITY"
  348. OUTPUTDATA_OPERATION = 4195392 # 0x00400440, R/W, mode, "OUTPUT DATA OPERATION"
  349. TESTPATTERN_KIND = 4195600 # 0x00400510, R/W, mode, "TEST PATTERN KIND"
  350. TESTPATTERN_OPTION = 4195616 # 0x00400520, R/W, long, "TEST PATTERN OPTION"
  351. EXTRACTION_MODE = 4195872 # 0x00400620
  352. # Group: ROI
  353. # binning and subarray
  354. BINNING = 4198672 # 0x00401110, R/W, mode, "BINNING"
  355. BINNING_INDEPENDENT = 4198688 # 0x00401120, R/W, mode, "BINNING INDEPENDENT"
  356. BINNING_HORZ = 4198704 # 0x00401130, R/W, long, "BINNING HORZ"
  357. BINNING_VERT = 4198720 # 0x00401140, R/W, long, "BINNING VERT"
  358. SUBARRAYHPOS = 4202768 # 0x00402110, R/W, long, "SUBARRAY HPOS"
  359. SUBARRAYHSIZE = 4202784 # 0x00402120, R/W, long, "SUBARRAY HSIZE"
  360. SUBARRAYVPOS = 4202800 # 0x00402130, R/W, long, "SUBARRAY VPOS"
  361. SUBARRAYVSIZE = 4202816 # 0x00402140, R/W, long, "SUBARRAY VSIZE"
  362. SUBARRAYMODE = 4202832 # 0x00402150, R/W, mode, "SUBARRAY MODE"
  363. DIGITALBINNING_METHOD = 4202848 # 0x00402160, R/W, mode, "DIGITALBINNING METHOD"
  364. DIGITALBINNING_HORZ = 4202864 # 0x00402170, R/W, long, "DIGITALBINNING HORZ"
  365. DIGITALBINNING_VERT = 4202880 # 0x00402180, R/W, long, "DIGITALBINNING VERT"
  366. # Group: TIMING
  367. # synchronous timing
  368. TIMING_READOUTTIME = 4206608 # 0x00403010, R/O, sec, "TIMING READOUT TIME"
  369. TIMING_CYCLICTRIGGERPERIOD = 4206624 # 0x00403020, R/O, sec, "TIMING CYCLIC TRIGGER PERIOD"
  370. TIMING_MINTRIGGERBLANKING = 4206640 # 0x00403030, R/O, sec, "TIMING MINIMUM TRIGGER BLANKING"
  371. # 0x00403040 is reserved
  372. TIMING_MINTRIGGERINTERVAL = 4206672 # 0x00403050, R/O, sec, "TIMING MINIMUM TRIGGER INTERVAL"
  373. TIMING_EXPOSURE = 4206688 # 0x00403060, R/O, mode, "TIMING EXPOSURE"
  374. TIMING_INVALIDEXPOSUREPERIOD = 4206704 # 0x00403070, R/O, sec, "INVALID EXPOSURE PERIOD"
  375. TIMING_FRAMESKIPNUMBER = 4206720 # 0x00403080, R/W, long, "TIMING FRAME SKIP NUMBER"
  376. TIMING_GLOBALEXPOSUREDELAY = 4206736 # 0x00403090, R/O, sec, "TIMING GLOBAL EXPOSURE DELAY"
  377. INTERNALFRAMERATE = 4208656 # 0x00403810, R/W, 1/sec, "INTERNAL FRAME RATE"
  378. INTERNAL_FRAMEINTERVAL = 4208672 # 0x00403820, R/W, sec, "INTERNAL FRAME INTERVAL"
  379. INTERNALLINERATE = 4208688 # 0x00403830, R/W, 1/sec, "INTERNAL LINE RATE"
  380. INTERNALLINESPEED = 4208704 # 0x00403840, R/W, m/sec, "INTERNAL LINE SPEEED"
  381. INTERNAL_LINEINTERVAL = 4208720 # 0x00403850, R/W, sec, "INTERNAL LINE INTERVAL"
  382. # system information
  383. TIMESTAMP_PRODUCER = 4262416 # 0x00410A10, R/O, mode, "TIME STAMP PRODUCER"
  384. FRAMESTAMP_PRODUCER = 4262432 # 0x00410A20, R/O, mode, "FRAME STAMP PRODUCER"
  385. TRANSFERINFO_FRAMECOUNT = 4262672 # 0x00410B10, R/O, long, "TRANSFER INFO FRAME COUNT"
  386. TRANSFERINFO_LOSTCOUNT = 4262673 # 0x00410B11, R/O, long, "TRANSFER INFO LOST COUNT"
  387. # Group: READOUT
  388. # image information
  389. # 0x00420110 is reserved
  390. COLORTYPE = 4325664 # 0x00420120, R/W, mode, "COLORTYPE"
  391. BITSPERCHANNEL = 4325680 # 0x00420130, R/W, long, "BIT PER CHANNEL"
  392. # 0x00420140 is reserved
  393. # 0x00420150 is reserved
  394. NUMBEROF_CHANNEL = 4325760 # 0x00420180, R/O, long, "NUMBER OF CHANNEL"
  395. ACTIVE_CHANNELINDEX = 4325776 # 0x00420190, R/W, mode, "ACTIVE CHANNEL INDEX"
  396. NUMBEROF_VIEW = 4325824 # 0x004201C0, R/O, long, "NUMBER OF VIEW"
  397. ACTIVE_VIEWINDEX = 4325840 # 0x004201D0, R/W, mode, "ACTIVE VIEW INDEX"
  398. IMAGE_WIDTH = 4325904 # 0x00420210, R/O, long, "IMAGE WIDTH"
  399. IMAGE_HEIGHT = 4325920 # 0x00420220, R/O, long, "IMAGE HEIGHT"
  400. IMAGE_ROWBYTES = 4325936 # 0x00420230, R/O, long, "IMAGE ROWBYTES"
  401. IMAGE_FRAMEBYTES = 4325952 # 0x00420240, R/O, long, "IMAGE FRAMEBYTES"
  402. IMAGE_TOPOFFSETBYTES = 4325968 # 0x00420250
  403. IMAGE_PIXELTYPE = 4326000 # 0x00420270, R/W, DCAM_PIXELTYPE, "IMAGE PIXEL TYPE"
  404. IMAGE_CAMERASTAMP = 4326144 # 0x00420300, R/W, long, "IMAGE CAMERA STAMP"
  405. RECORDFIXEDBYTES_PERFILE = 4326416 # 0x00420410, R/O, long "RECORD FIXED BYTES PER FILE"
  406. RECORDFIXEDBYTES_PERSESSION = 4326432 # 0x00420420
  407. RECORDFIXEDBYTES_PERFRAME = 4326448 # 0x00420430, R/O, long "RECORD FIXED BYTES PER FRAME"
  408. # frame bundle
  409. FRAMEBUNDLE_MODE = 4329488 # 0x00421010, R/W, mode, "FRAMEBUNDLE MODE"
  410. FRAMEBUNDLE_NUMBER = 4329504 # 0x00421020, R/W, long, "FRAMEBUNDLE NUMBER"
  411. FRAMEBUNDLE_ROWBYTES = 4329520 # 0x00421030, R/O, long, "FRAMEBUNDLE ROWBYTES"
  412. FRAMEBUNDLE_FRAMESTEPBYTES = 4329536 # 0x00421040, R/O, long, "FRAMEBUNDLE FRAME STEP BYTES"
  413. # partial area
  414. NUMBEROF_PARTIALAREA = 4390928 # 0x00430010
  415. PARTIALAREA_HPOS = 4395008 # 0x00431000, R/W, long, "PARTIAL AREA HPOS"
  416. PARTIALAREA_HSIZE = 4399104 # 0x00432000, R/W, long, "PARTIAL AREA HSIZE"
  417. PARTIALAREA_VPOS = 4403200 # 0x00433000, R/W, long, "PARTIAL AREA VPOS"
  418. PARTIALAREA_VSIZE = 4407296 # 0x00434000, R/W, long, "PARTIAL AREA VSIZE"
  419. _PARTIALAREA = 16 # 0x00000010, the offset of ID for Nth PARTIAL AREA
  420. # multi line
  421. NUMBEROF_MULTILINE = 4517904 # 0x0044F010, R/W, long, "NUMBER OF MULTI LINE"
  422. MULTILINE_VPOS = 4521984 # 0x00450000, R/W, long, "MULTI LINE VPOS"
  423. MULTILINE_VSIZE = 4587520 # 0x00460000, R/W, long, "MULTI LINE VSIZE"
  424. _MULTILINE = 16 # 0x00000010, the offset of ID for Nth MULTI LINE
  425. # defect
  426. DEFECTCORRECT_MODE = 4653072 # 0x00470010, R/W, mode, "DEFECT CORRECT MODE"
  427. NUMBEROF_DEFECTCORRECT = 4653088 # 0x00470020, R/W, long, "NUMBER OF DEFECT CORRECT"
  428. HOTPIXELCORRECT_LEVEL = 4653104 # 0x00470030, R/W, mode, "HOT PIXEL CORRECT LEVEL"
  429. DEFECTCORRECT_HPOS = 4657152 # 0x00471000, R/W, long, "DEFECT CORRECT HPOS"
  430. DEFECTCORRECT_METHOD = 4665344 # 0x00473000, R/W, mode, "DEFECT CORRECT METHOD"
  431. # - 0x0047FFFF for 256 DEFECT
  432. _DEFECTCORRECT = 16 # 0x00000010, the offset of ID for Nth DEFECT
  433. # Group: device buffer countrol
  434. DEVICEBUFFER_MODE = 4784128 # 0x00490000, R/W, mode, "DEVICE BUFFER MODE"
  435. DEVICEBUFFER_FRAMECOUNTMAX = 4784160 # 0x00490020, R/O, long, "DEVICE BUFFER FRAME COUNT MAX"
  436. # Group: CALIBREGION
  437. CALIBREGION_MODE = 4203536 # 0x00402410, R/W, mode, "CALIBRATE REGION MODE"
  438. NUMBEROF_CALIBREGION = 4203552 # 0x00402420
  439. CALIBREGION_HPOS = 4915200 # 0x004B0000, R/W, long, "CALIBRATE REGION HPOS"
  440. CALIBREGION_HSIZE = 4919296 # 0x004B1000, R/W, long, "CALIBRATE REGION HSIZE"
  441. # - 0x0048FFFF for 256 REGIONs at least
  442. _CALIBREGION = 16 # 0x00000010, the offset of ID for Nth REGION
  443. # Group: MASKREGION
  444. MASKREGION_MODE = 4203792 # 0x00402510, R/W, mode, "MASK REGION MODE"
  445. NUMBEROF_MASKREGION = 4203808 # 0x00402520, R/W, long, "NUMBER OF MASK REGION"
  446. MASKREGION_HPOS = 4980736 # 0x004C0000, R/W, long, "MASK REGION HPOS"
  447. MASKREGION_HSIZE = 4984832 # 0x004C1000, R/W, long, "MASK REGION HSIZE"
  448. # - 0x0048FFFF for 256 REGIONs at least
  449. _MASKREGION = 16 # 0x00000010, the offset of ID for Nth REGION
  450. # Group: Camera Status
  451. CAMERASTATUS_INTENSITY = 5050640 # 0x004D1110, R/O, mode, "CAMERASTATUS INTENSITY"
  452. CAMERASTATUS_INPUTTRIGGER = 5050656 # 0x004D1120
  453. CAMERASTATUS_CALIBRATION = 5050672 # 0x004D1130, R/O, mode, "CAMERASTATUS CALIBRATION"
  454. # Group: Back Focus Position
  455. BACKFOCUSPOS_TARGET = 8405008 # 0x00804010, R/W, micro-meter,"BACK FOCUS POSITION TARGET"
  456. BACKFOCUSPOS_CURRENT = 8405024 # 0x00804020, R/O, micro-meter,"BACK FOCUS POSITION CURRENT"
  457. BACKFOCUSPOS_LOADFROMMEMORY = 8405072 # 0x00804050
  458. BACKFOCUSPOS_STORETOMEMORY = 8405088 # 0x00804060, W/O, long, "BACK FOCUS POSITION STORE TO MEMORY"
  459. # Group: MAICO
  460. CONFOCAL_SCANMODE = 9502736 # 0x00910010, R/W, mode, "CONFOCAL SCAN MODE"
  461. CONFOCAL_SCANLINES = 9502752 # 0x00910020, R/W, long, "CONFOCAL SCANLINES"
  462. CONFOCAL_ZOOM = 9502768 # 0x00910030, R/W, long, "CONFOCAL ZOOM"
  463. SUBUNIT_IMAGEWIDTH = 9502944 # 0x009100e0, R/O, long, "SUBUNIT IMAGE WIDTH
  464. NUMBEROF_SUBUNIT = 9502960 # 0x009100f0, R/O, long, "NUMBER OF SUBUNIT"
  465. SUBUNIT_CONTROL = 9502976 # 0x00910100, R/W, mode, "SUBUNIT CONTROL"
  466. SUBUNIT_LASERPOWER = 9503232 # 0x00910200, R/W, long, "SUBUNIT LASERPOWER"
  467. SUBUNIT_PMTGAIN = 9503488 # 0x00910300, R/W, real, "SUBUNIT PMTGAIN"
  468. SUBUNIT_PINHOLESIZE = 9503744 # 0x00910400, R/O, long, "SUBUNIT PINHOLE SIZE"
  469. SUBUNIT_WAVELENGTH = 9504000 # 0x00910500, R/O, long, "SUBUNIT WAVELENGTH"
  470. SUBUNIT_TOPOFFSETBYTES = 9504256 # 0x00910600, R/O, long, "SUBUNIT TOP OFFSET BYTES"
  471. _SUBUNIT = 16 # 0x00000010, the offset of ID for Nth Subunit parameter
  472. # Group: SYSTEM
  473. # system property
  474. SYSTEM_ALIVE = 16711696 # 0x00FF0010, R/O, mode, "SYSTEM ALIVE"
  475. CONVERSIONFACTOR_COEFF = 16769040 # 0x00FFE010, R/O, double, "CONVERSION FACTOR COEFF"
  476. CONVERSIONFACTOR_OFFSET = 16769056 # 0x00FFE020, R/O, double, "CONVERSION FACTOR OFFSET"
  477. # ==== declare structures for DCAM-API functions ====
  478. class DCAMAPI_INIT(Structure):
  479. _pack_ = 8
  480. _fields_ = [
  481. ('size', c_int32),
  482. ('iDeviceCount', c_int32), # out
  483. ('reserved', c_int32),
  484. ('initoptionbytes', c_int32),
  485. ('initoption', POINTER(c_int32)),
  486. ('guid', c_void_p) # const DCAM_GUID*
  487. ]
  488. def __init__(self):
  489. self.size = sizeof(DCAMAPI_INIT)
  490. class DCAMDEV_OPEN(Structure):
  491. _pack_ = 8
  492. _fields_ = [
  493. ('size', c_int32),
  494. ('index', c_int32),
  495. ('hdcam', c_void_p) # out
  496. ]
  497. def __init__(self):
  498. self.size = sizeof(DCAMDEV_OPEN)
  499. self.index = 0
  500. class DCAMDEV_STRING(Structure):
  501. _pack_ = 8
  502. _fields_ = [
  503. ('size', c_int32),
  504. ('iString', c_int32),
  505. ('text', c_char_p),
  506. ('textbytes', c_int32)
  507. ]
  508. def __init__(self):
  509. self.size = sizeof(DCAMDEV_STRING)
  510. def alloctext(self, maxlen):
  511. self._textbuf = create_string_buffer(maxlen)
  512. self.text = addressof(self._textbuf)
  513. self.textbytes = sizeof(self._textbuf)
  514. class DCAM_PROP:
  515. class ATTR(IntEnum):
  516. """
  517. Attributer flags.
  518. """
  519. HASRANGE = -2147483647 # 0x80000000
  520. HASSTEP = 0x40000000
  521. HASDEFAULT = 0x20000000
  522. HASVALUETEXT = 0x10000000
  523. HASCHANNEL = 0x08000000
  524. AUTOROUNDING = 0x00800000
  525. STEPPING_INCONSISTENT = 0x00400000
  526. DATASTREAM = 0x00200000
  527. HASRATIO = 0x00100000
  528. VOLATILE = 0x00080000
  529. WRITABLE = 0x00020000
  530. READABLE = 0x00010000
  531. HASVIEW = 0x00008000
  532. _SYSTEM = 0x00004000
  533. ACCESSREADY = 0x00002000
  534. ACCESSBUSY = 0x00001000
  535. ADVANCED = 0x00000800
  536. EFFECTIVE = 0x00000200
  537. class TYPE(IntEnum):
  538. """
  539. property types.
  540. """
  541. NONE = 0
  542. MODE = 1
  543. LONG = 2
  544. REAL = 3
  545. MASK = 15
  546. class ATTR2(IntEnum):
  547. """
  548. Attributer2 flags.
  549. """
  550. ARRAYBASE = 134217728 # 0x08000000
  551. ARRAYELEMENT = 67108864 # 0x04000000
  552. REAL32 = 33554432 # 0x02000000
  553. INITIALIZEIMPROPER = 1 # 0x00000001
  554. CHANNELSEPARATEDDATA = 262144 # 0x00040000, Channel 0 value is total of each channels.
  555. class DCAMPROP_OPTION(IntEnum):
  556. """
  557. options
  558. """
  559. PRIOR = -16777215 # 0xFF000000
  560. NEXT = 0x01000000
  561. NEAREST = 0x80000000
  562. SUPPORT = 0x00000000
  563. UPDATED = 0x00000001
  564. VOLATILE = 0x00000002
  565. ARRAYELEMENT = 0x00000004
  566. NONE = 0x00000000
  567. class DCAMPROP_UNIT(IntEnum):
  568. """
  569. Unit of value
  570. """
  571. SECOND = 1
  572. CELSIUS = 2
  573. KELVIN = 3
  574. METERPERSECOND = 4
  575. PERSECOND = 5
  576. DEGREE = 6
  577. MICROMETER = 7
  578. NONE = 0
  579. # property values
  580. class DCAMPROP:
  581. class SENSORMODE(IntEnum):
  582. AREA = 1
  583. LINE = 3
  584. TDI = 4
  585. TDI_EXTENDED = 10
  586. PROGRESSIVE = 12
  587. SPLITVIEW = 14
  588. DUALLIGHTSHEET = 16
  589. PHOTONNUMBERRESOLVING = 18
  590. WHOLELINES = 19
  591. class SHUTTER_MODE(IntEnum):
  592. GLOBAL = 1
  593. ROLLING = 2
  594. class READOUTSPEED(IntEnum):
  595. SLOWEST = 1
  596. FASTEST = 0x7FFFFFFF
  597. class READOUT_DIRECTION(IntEnum):
  598. FORWARD = 1
  599. BACKWARD = 2
  600. BYTRIGGER = 3
  601. DIVERGE = 5
  602. FORWARDBIDIRECTION = 6
  603. REVERSEBIDIRECTION = 7
  604. class READOUT_UNIT(IntEnum):
  605. FRAME = 2
  606. BUNDLEDLINE = 3
  607. BUNDLEDFRAME = 4
  608. class CCDMODE(IntEnum):
  609. NORMALCCD = 1
  610. EMCCD = 2
  611. class CMOSMODE(IntEnum):
  612. NORMAL = 1
  613. NONDESTRUCTIVE = 2
  614. class MULTILINESENSOR_READOUTMODE(IntEnum):
  615. SYNCACCUMULATE = 1
  616. SYNCAVERAGE = 2
  617. class OUTPUT_INTENSITY(IntEnum):
  618. NORMAL = 1
  619. TESTPATTERN = 2
  620. class OUTPUTDATA_OPERATION(IntEnum):
  621. RAW = 1
  622. ALIGNED = 2
  623. class TESTPATTERN_KIND(IntEnum):
  624. FLAT = 2
  625. IFLAT = 3
  626. HORZGRADATION = 4
  627. IHORZGRADATION = 5
  628. VERTGRADATION = 6
  629. IVERTGRADATION = 7
  630. LINE = 8
  631. ILINE = 9
  632. DIAGONAL = 10
  633. IDIAGONAL = 11
  634. FRAMECOUNT = 12
  635. class DIGITALBINNING_METHOD(IntEnum):
  636. MINIMUM = 1
  637. MAXIMUM = 2
  638. ODD = 3
  639. EVEN = 4
  640. SUM = 5
  641. AVERAGE = 6
  642. class TRIGGERSOURCE(IntEnum):
  643. INTERNAL = 1
  644. EXTERNAL = 2
  645. SOFTWARE = 3
  646. MASTERPULSE = 4
  647. class TRIGGERACTIVE(IntEnum):
  648. EDGE = 1
  649. LEVEL = 2
  650. SYNCREADOUT = 3
  651. POINT = 4
  652. class BUS_SPEED(IntEnum):
  653. SLOWEST = 1
  654. FASTEST = 0x7FFFFFFF
  655. class TRIGGER_MODE(IntEnum):
  656. NORMAL = 1
  657. PIV = 3
  658. START = 6
  659. class TRIGGERPOLARITY(IntEnum):
  660. NEGATIVE = 1
  661. POSITIVE = 2
  662. class TRIGGER_CONNECTOR(IntEnum):
  663. INTERFACE = 1
  664. BNC = 2
  665. MULTI = 3
  666. class INTERNALTRIGGER_HANDLING(IntEnum):
  667. SHORTEREXPOSURETIME = 1
  668. FASTERFRAMERATE = 2
  669. ABANDONWRONGFRAME = 3
  670. BURSTMODE = 4
  671. INDIVIDUALEXPOSURE = 7
  672. class SYNCREADOUT_SYSTEMBLANK(IntEnum):
  673. STANDARD = 1
  674. MINIMUM = 2
  675. class TRIGGERENABLE_ACTIVE(IntEnum):
  676. DENY = 1
  677. ALWAYS = 2
  678. LEVEL = 3
  679. START = 4
  680. class TRIGGERENABLE_POLARITY(IntEnum):
  681. NEGATIVE = 1
  682. POSITIVE = 2
  683. INTERLOCK = 3
  684. class OUTPUTTRIGGER_CHANNELSYNC(IntEnum):
  685. _1CHANNEL = 1
  686. _2CHANNELS = 2
  687. _3CHANNELS = 3
  688. class OUTPUTTRIGGER_PROGRAMABLESTART(IntEnum):
  689. FIRSTEXPOSURE = 1
  690. FIRSTREADOUT = 2
  691. class OUTPUTTRIGGER_SOURCE(IntEnum):
  692. EXPOSURE = 1
  693. READOUTEND = 2
  694. VSYNC = 3
  695. HSYNC = 4
  696. TRIGGER = 6
  697. class OUTPUTTRIGGER_POLARITY(IntEnum):
  698. NEGATIVE = 1
  699. POSITIVE = 2
  700. class OUTPUTTRIGGER_ACTIVE(IntEnum):
  701. EDGE = 1
  702. LEVEL = 2
  703. class OUTPUTTRIGGER_KIND(IntEnum):
  704. LOW = 1
  705. GLOBALEXPOSURE = 2
  706. PROGRAMABLE = 3
  707. TRIGGERREADY = 4
  708. HIGH = 5
  709. ANYROWEXPOSURE = 6
  710. class OUTPUTTRIGGER_BASESENSOR(IntEnum):
  711. VIEW1 = 1
  712. VIEW2 = 2
  713. ANYVIEW = 15
  714. ALLVIEWS = 16
  715. class EXPOSURETIME_CONTROL(IntEnum):
  716. OFF = 1
  717. NORMAL = 2
  718. class TRIGGER_FIRSTEXPOSURE(IntEnum):
  719. NEW = 1
  720. CURRENT = 2
  721. class TRIGGER_GLOBALEXPOSURE(IntEnum):
  722. NONE = 1
  723. ALWAYS = 2
  724. DELAYED = 3
  725. EMULATE = 4
  726. GLOBALRESET = 5
  727. class FIRSTTRIGGER_BEHAVIOR(IntEnum):
  728. STARTEXPOSURE = 1
  729. STARTREADOUT = 2
  730. class MASTERPULSE_MODE(IntEnum):
  731. CONTINUOUS = 1
  732. START = 2
  733. BURST = 3
  734. class MASTERPULSE_TRIGGERSOURCE(IntEnum):
  735. EXTERNAL = 1
  736. SOFTWARE = 2
  737. class MECHANICALSHUTTER(IntEnum):
  738. AUTO = 1
  739. CLOSE = 2
  740. OPEN = 3
  741. class LIGHTMODE(IntEnum):
  742. LOWLIGHT = 1
  743. HIGHLIGHT = 2
  744. class SENSITIVITYMODE(IntEnum):
  745. OFF = 1
  746. ON = 2
  747. INTERLOCK = 3
  748. class EMGAINWARNING_STATUS(IntEnum):
  749. NORMAL = 1
  750. WARNING = 2
  751. PROTECTED = 3
  752. class PHOTONIMAGINGMODE(IntEnum):
  753. _0 = 0
  754. _1 = 1
  755. _2 = 2
  756. _3 = 3
  757. class SENSORCOOLER(IntEnum):
  758. OFF = 1
  759. ON = 2
  760. MAX = 4
  761. class SENSORTEMPERATURE_STATUS(IntEnum):
  762. NORMAL = 0
  763. WARNING = 1
  764. PROTECTION = 2
  765. class SENSORCOOLERSTATUS(IntEnum):
  766. ERROR4 = -4
  767. ERROR3 = -3
  768. ERROR2 = -2
  769. ERROR1 = -1
  770. NONE = 0
  771. OFF = 1
  772. READY = 2
  773. BUSY = 3
  774. ALWAYS = 4
  775. WARNING = 5
  776. class REALTIMEGAINCORRECT_LEVEL(IntEnum):
  777. _1 = 1
  778. _2 = 2
  779. _3 = 3
  780. _4 = 4
  781. _5 = 5
  782. class WHITEBALANCEMODE(IntEnum):
  783. FLAT = 1
  784. AUTO = 2
  785. TEMPERATURE = 3
  786. USERPRESET = 4
  787. class DARKCALIB_TARGET(IntEnum):
  788. ALL = 1
  789. ANALOG = 2
  790. class SHADINGCALIB_METHOD(IntEnum):
  791. AVERAGE = 1
  792. MAXIMUM = 2
  793. USETARGET = 3
  794. class CAPTUREMODE(IntEnum):
  795. NORMAL = 1
  796. DARKCALIB = 2
  797. SHADINGCALIB = 3
  798. TAPGAINCALIB = 4
  799. BACKFOCUSCALIB = 5
  800. class IMAGEFILTER(IntEnum):
  801. THROUGH = 0
  802. PATTERN_1 = 1
  803. class INTERFRAMEALU_ENABLE(IntEnum):
  804. OFF = 1
  805. TRIGGERSOURCE_ALL = 2
  806. TRIGGERSOURCE_INTERNAL = 3
  807. class SHADINGCALIB_DATASTATUS(IntEnum):
  808. NONE = 1
  809. FORWARD = 2
  810. BACKWARD = 3
  811. BOTH = 4
  812. class TAPGAINCALIB_METHOD(IntEnum):
  813. AVE = 1
  814. MAX = 2
  815. MIN = 3
  816. class RECURSIVEFILTERFRAMES(IntEnum):
  817. _2 = 2
  818. _4 = 4
  819. _8 = 8
  820. _16 = 16
  821. _32 = 32
  822. _64 = 64
  823. class INTENSITYLUT_MODE(IntEnum):
  824. THROUGH = 1
  825. PAGE = 2
  826. CLIP = 3
  827. class BINNING(IntEnum):
  828. _1 = 1
  829. _2 = 2
  830. _4 = 4
  831. _8 = 8
  832. _16 = 16
  833. _1_2 = 102
  834. _2_4 = 204
  835. class COLORTYPE(IntEnum):
  836. BW = 0x00000001
  837. RGB = 0x00000002
  838. BGR = 0x00000003
  839. class BITSPERCHANNEL(IntEnum):
  840. _8 = 8
  841. _10 = 10
  842. _12 = 12
  843. _14 = 14
  844. _16 = 16
  845. class DEFECTCORRECT_MODE(IntEnum):
  846. OFF = 1
  847. ON = 2
  848. class DEFECTCORRECT_METHOD(IntEnum):
  849. CEILING = 3
  850. PREVIOUS = 4
  851. NEXT = 5
  852. class HOTPIXELCORRECT_LEVEL(IntEnum):
  853. STANDARD = 1
  854. MINIMUM = 2
  855. AGGRESSIVE = 3
  856. class DEVICEBUFFER_MODE(IntEnum):
  857. THRU = 1
  858. SNAPSHOT = 2
  859. class SYSTEM_ALIVE(IntEnum):
  860. OFFLINE = 1
  861. ONLINE = 2
  862. ERROR = 3
  863. class TIMESTAMP_MODE(IntEnum):
  864. NONE = 1
  865. LINEBEFORELEFT = 2
  866. LINEOVERWRITELEFT = 3
  867. AREABEFORELEFT = 4
  868. AREAOVERWRITELEFT = 5
  869. class TIMING_EXPOSURE(IntEnum):
  870. AFTERREADOUT = 1
  871. OVERLAPREADOUT = 2
  872. ROLLING = 3
  873. ALWAYS = 4
  874. TDI = 5
  875. class TIMESTAMP_PRODUCER(IntEnum):
  876. NONE = 1
  877. DCAMMODULE = 2
  878. KERNELDRIVER = 3
  879. CAPTUREDEVICE = 4
  880. IMAGINGDEVICE = 5
  881. class FRAMESTAMP_PRODUCER(IntEnum):
  882. NONE = 1
  883. DCAMMODULE = 2
  884. KERNELDRIVER = 3
  885. CAPTUREDEVICE = 4
  886. IMAGINGDEVICE = 5
  887. class CAMERASTATUS_INTENSITY(IntEnum):
  888. GOOD = 1
  889. TOODARK = 2
  890. TOOBRIGHT = 3
  891. UNCARE = 4
  892. EMGAIN_PROTECTION = 5
  893. INCONSISTENT_OPTICS = 6
  894. NODATA = 7
  895. class CAMERASTATUS_INPUTTRIGGER(IntEnum):
  896. GOOD = 1
  897. NONE = 2
  898. TOOFREQUENT = 3
  899. class CAMERASTATUS_CALIBRATION(IntEnum):
  900. DONE = 1
  901. NOTYET = 2
  902. NOTRIGGER = 3
  903. TOOFREQUENTTRIGGER = 4
  904. OUTOFADJUSTABLERANGE = 5
  905. UNSUITABLETABLE = 6
  906. TOODARK = 7
  907. TOOBRIGHT = 8
  908. NOTDETECTOBJECT = 9
  909. class CONFOCAL_SCANMODE(IntEnum):
  910. SIMULTANEOUS = 1
  911. SEQUENTIAL = 2
  912. class SUBUNIT_CONTROL(IntEnum):
  913. NOTINSTALLED = 0
  914. OFF = 1
  915. ON = 2
  916. class SUBUNIT_PINHOLESIZE(IntEnum):
  917. ERROR = 1
  918. SMALL = 2
  919. MEDIUM = 3
  920. LARGE = 4
  921. class MODE(IntEnum):
  922. OFF = 1
  923. ON = 2
  924. class DCAMPROP_ATTR(Structure):
  925. _pack_ = 8
  926. _fields_ = [
  927. ('cbSize', c_int32),
  928. ('iProp', c_int32),
  929. ('option', c_int32),
  930. ('iReserved1', c_int32),
  931. ('attribute', c_int32),
  932. ('iGroup', c_int32),
  933. ('iUnit', c_int32),
  934. ('attribute2', c_int32),
  935. ('valuemin', c_double),
  936. ('valuemax', c_double),
  937. ('valuestep', c_double),
  938. ('valuedefault', c_double),
  939. ('nMaxChannel', c_int32),
  940. ('iReserved3', c_int32),
  941. ('nMaxView', c_int32),
  942. ('iProp_NumberOfElement', c_int32),
  943. ('iProp_ArrayBase', c_int32),
  944. ('iPropStep_Element', c_int32)
  945. ]
  946. def __init__(self):
  947. self.cbSize = sizeof(DCAMPROP_ATTR)
  948. def is_effective(self):
  949. return True if self.attribute & DCAM_PROP.ATTR.EFFECTIVE else False
  950. def is_writable(self):
  951. return True if self.attribute & DCAM_PROP.ATTR.WRITABLE else False
  952. def is_readable(self):
  953. return True if self.attribute & DCAM_PROP.ATTR.READABLE else False
  954. def is_volatile(self):
  955. return True if self.attribute & DCAM_PROP.ATTR.VOLATILE else False
  956. def is_accessready(self):
  957. return True if self.attribute & DCAM_PROP.ATTR.ACCESSREADY else False
  958. def is_accessbusy(self):
  959. return True if self.attribute & DCAM_PROP.ATTR.ACCESSBUSY else False
  960. def is_datastream(self):
  961. return True if self.attribute & DCAM_PROP.ATTR.DATASTREAM else False
  962. def is_autorounding(self):
  963. return True if self.attribute & DCAM_PROP.ATTR.AUTOROUNDING else False
  964. def is_stepping_inconsistent(self):
  965. return True if self.attribute & DCAM_PROP.ATTR.STEPPING_INCONSISTENT else False
  966. def is_hasview(self):
  967. return True if self.attribute & DCAM_PROP.ATTR.HASVIEW else False
  968. def is_haschannel(self):
  969. return True if self.attribute & DCAM_PROP.ATTR.HASCHANNEL else False
  970. class DCAMPROP_VALUETEXT(Structure):
  971. _pack_ = 8
  972. _fields_ = [
  973. ('cbSize', c_int32),
  974. ('iProp', c_int32),
  975. ('value', c_double),
  976. ('text', c_char_p),
  977. ('textbytes', c_int32)
  978. ]
  979. def __init__(self):
  980. self.cbSize = sizeof(DCAMPROP_VALUETEXT)
  981. def alloctext(self, maxlen):
  982. self._textbuf = create_string_buffer(maxlen)
  983. self.text = addressof(self._textbuf)
  984. self.textbytes = sizeof(self._textbuf)
  985. class DCAM_TIMESTAMP(Structure):
  986. _pack_ = 8
  987. _fields_ = [
  988. ('sec', c_uint32),
  989. ('microsec', c_int32)
  990. ]
  991. def __init__(self):
  992. self.sec = 0
  993. self.microsec = 0
  994. class DCAMCAP_TRANSFERINFO(Structure):
  995. _pack_ = 8
  996. _fields_ = [
  997. ('size', c_int32),
  998. ('iKind', c_int32),
  999. ('nNewestFrameIndex', c_int32),
  1000. ('nFrameCount', c_int32)
  1001. ]
  1002. def __init__(self):
  1003. self.size = sizeof(DCAMCAP_TRANSFERINFO)
  1004. self.iKind = 0
  1005. self.nNewestFrameIndex = -1
  1006. self.nFrameCount = 0
  1007. class DCAMBUF_FRAME(Structure):
  1008. _pack_ = 8
  1009. _fields_ = [
  1010. ('size', c_int32),
  1011. ('iKind', c_int32),
  1012. ('option', c_int32),
  1013. ('iFrame', c_int32),
  1014. ('buf', c_void_p),
  1015. ('rowbytes', c_int32),
  1016. ('type', c_int32), # DCAM_PIXELTYPE
  1017. ('width', c_int32),
  1018. ('height', c_int32),
  1019. ('left', c_int32),
  1020. ('top', c_int32),
  1021. ('timestamp', DCAM_TIMESTAMP),
  1022. ('framestamp', c_int32),
  1023. ('camerastamp', c_int32)
  1024. ]
  1025. def __init__(self):
  1026. self.size = sizeof(DCAMBUF_FRAME)
  1027. self.iKind = 0
  1028. self.option = 0
  1029. self.iFrame = 0
  1030. self.buf = 0
  1031. self.rowbytes = 0
  1032. self.type = DCAM_PIXELTYPE.MONO16
  1033. self.width = 0
  1034. self.height = 0
  1035. self.left = 0
  1036. self.top = 0
  1037. self.timestamp = DCAM_TIMESTAMP()
  1038. self.framestamp = 0
  1039. self.camerastamp = 0
  1040. class DCAMWAIT_OPEN(Structure):
  1041. _pack_ = 8
  1042. _fields_ = [
  1043. ('size', c_int32),
  1044. ('supportevent', c_int32), # out
  1045. ('hwait', c_void_p), # out
  1046. ('hdcam', c_void_p)
  1047. ]
  1048. def __init__(self):
  1049. self.size = sizeof(DCAMWAIT_OPEN)
  1050. class DCAMWAIT_START(Structure):
  1051. _pack_ = 8
  1052. _fields_ = [
  1053. ('size', c_int32),
  1054. ('eventhappened', c_int32), # out
  1055. ('eventmask', c_int32),
  1056. ('timeout', c_int32)
  1057. ]
  1058. def __init__(self):
  1059. self.size = sizeof(DCAMWAIT_START)
  1060. if __platform_system == 'Windows':
  1061. class DCAMREC_OPEN(Structure): # DCAMREC_OPENW
  1062. _pack_ = 8
  1063. _fields_ = [
  1064. ('size', c_int32), # [in] size of this structure.
  1065. ('reserved', c_int32), # [in]
  1066. ('hrec', c_void_p), # [out]
  1067. ('path', c_wchar_p), # [in] wchar_t*
  1068. ('ext', c_wchar_p), # [in] wchar_t*
  1069. ('maxframepersession', c_int32), # [in]
  1070. ('userdatasize', c_int32), # [in]
  1071. ('userdatasize_session', c_int32), # [in]
  1072. ('userdatasize_file', c_int32), # [in]
  1073. ('usertextsize', c_int32), # [in]
  1074. ('usertextsize_session', c_int32), # [in]
  1075. ('usertextsize_file', c_int32), # [in]
  1076. ]
  1077. def __init__(self):
  1078. self.size = sizeof(DCAMREC_OPEN)
  1079. # wtextbuf = create_unicode_buffer(256)
  1080. # self.path = addressof(wtextbuf)
  1081. self.ext = 0 # 'dcimg'.encode('UTF-16')
  1082. self.maxframepersession = 0
  1083. self.userdatasize_file = 0
  1084. self.usertextsize_file = 0
  1085. self.userdatasize_session = 0
  1086. self.usertextsize_session = 0
  1087. self.userdatasize = 0
  1088. self.usertextsize = 0
  1089. def setpath(self, filepath):
  1090. self.path = filepath
  1091. # ==== assign aliases ====
  1092. dcamapi_init = __dll.dcamapi_init
  1093. dcamapi_init.argtypes = [POINTER(DCAMAPI_INIT)]
  1094. dcamapi_init.restype = DCAMERR
  1095. dcamapi_uninit = __dll.dcamapi_uninit
  1096. dcamapi_uninit.restype = DCAMERR
  1097. dcamdev_open = __dll.dcamdev_open
  1098. dcamdev_open.argtypes = [POINTER(DCAMDEV_OPEN)]
  1099. dcamdev_open.restype = DCAMERR
  1100. dcamdev_close = __dll.dcamdev_close
  1101. dcamdev_close.argtypes = [c_void_p]
  1102. dcamdev_close.restype = DCAMERR
  1103. dcamdev_getstring = __dll.dcamdev_getstring
  1104. dcamdev_getstring.argtypes = [c_void_p, POINTER(DCAMDEV_STRING)]
  1105. dcamdev_getstring.restype = DCAMERR
  1106. dcamprop_getattr = __dll.dcamprop_getattr
  1107. dcamprop_getattr.argtypes = [c_void_p, POINTER(DCAMPROP_ATTR)]
  1108. dcamprop_getattr.restype = DCAMERR
  1109. dcamprop_getvalue = __dll.dcamprop_getvalue
  1110. dcamprop_getvalue.argtypes = [c_void_p, c_int32, POINTER(c_double)]
  1111. dcamprop_getvalue.restype = DCAMERR
  1112. dcamprop_setvalue = __dll.dcamprop_setvalue
  1113. dcamprop_setvalue.argtypes = [c_void_p, c_int32, c_double]
  1114. dcamprop_setvalue.restype = DCAMERR
  1115. dcamprop_setgetvalue = __dll.dcamprop_setgetvalue
  1116. dcamprop_setgetvalue.argtypes = [c_void_p, c_int32, POINTER(c_double), c_int32]
  1117. dcamprop_setgetvalue.restype = DCAMERR
  1118. dcamprop_queryvalue = __dll.dcamprop_queryvalue
  1119. dcamprop_queryvalue.argtypes = [c_void_p, c_int32, POINTER(c_double), c_int32]
  1120. dcamprop_queryvalue.restype = DCAMERR
  1121. dcamprop_getnextid = __dll.dcamprop_getnextid
  1122. dcamprop_getnextid.argtypes = [c_void_p, POINTER(c_int32), c_int32]
  1123. dcamprop_getnextid.restype = DCAMERR
  1124. dcamprop_getname = __dll.dcamprop_getname
  1125. dcamprop_getname.argtypes = [c_void_p, c_int32, c_char_p, c_int32]
  1126. dcamprop_getname.restype = DCAMERR
  1127. dcamprop_getvaluetext = __dll.dcamprop_getvaluetext
  1128. dcamprop_getvaluetext.argtypes = [c_void_p, POINTER(DCAMPROP_VALUETEXT)]
  1129. dcamprop_getvaluetext.restype = DCAMERR
  1130. dcambuf_alloc = __dll.dcambuf_alloc
  1131. dcambuf_alloc.argtypes = [c_void_p, c_int32]
  1132. dcambuf_alloc.restype = DCAMERR
  1133. dcambuf_release = __dll.dcambuf_release
  1134. dcambuf_release.argtypes = [c_void_p, c_int32]
  1135. dcambuf_release.restype = DCAMERR
  1136. dcambuf_lockframe = __dll.dcambuf_lockframe
  1137. dcambuf_lockframe.argtypes = [c_void_p, POINTER(DCAMBUF_FRAME)]
  1138. dcambuf_lockframe.restype = DCAMERR
  1139. dcambuf_copyframe = __dll.dcambuf_copyframe
  1140. dcambuf_copyframe.argtypes = [c_void_p, POINTER(DCAMBUF_FRAME)]
  1141. dcambuf_copyframe.restype = DCAMERR
  1142. dcamcap_start = __dll.dcamcap_start
  1143. dcamcap_start.argtypes = [c_void_p, c_int32]
  1144. dcamcap_start.restype = DCAMERR
  1145. dcamcap_stop = __dll.dcamcap_stop
  1146. dcamcap_stop.argtypes = [c_void_p]
  1147. dcamcap_stop.restype = DCAMERR
  1148. dcamcap_status = __dll.dcamcap_status
  1149. dcamcap_status.argtypes = [c_void_p, POINTER(c_int32)]
  1150. dcamcap_status.restype = DCAMERR
  1151. dcamcap_transferinfo = __dll.dcamcap_transferinfo
  1152. dcamcap_transferinfo.argtypes = [c_void_p, POINTER(DCAMCAP_TRANSFERINFO)]
  1153. dcamcap_transferinfo.restype = DCAMERR
  1154. dcamcap_firetrigger = __dll.dcamcap_firetrigger
  1155. dcamcap_firetrigger.argtypes = [c_void_p, c_int32]
  1156. dcamcap_firetrigger.restype = DCAMERR
  1157. if __platform_system == 'Windows':
  1158. dcamcap_record = __dll.dcamcap_record
  1159. dcamcap_record.argtypes = [c_void_p, c_void_p]
  1160. dcamcap_record.restype = DCAMERR
  1161. dcamwait_open = __dll.dcamwait_open
  1162. dcamwait_open.argtypes = [POINTER(DCAMWAIT_OPEN)]
  1163. dcamwait_open.restype = DCAMERR
  1164. dcamwait_close = __dll.dcamwait_close
  1165. dcamwait_close.argtypes = [c_void_p]
  1166. dcamwait_close.restype = DCAMERR
  1167. dcamwait_start = __dll.dcamwait_start
  1168. dcamwait_start.argtypes = [c_void_p, POINTER(DCAMWAIT_START)]
  1169. dcamwait_start.restype = DCAMERR
  1170. dcamwait_abort = __dll.dcamwait_abort
  1171. dcamwait_abort.argtypes = [c_void_p]
  1172. dcamwait_abort.restype = DCAMERR
  1173. if __platform_system == 'Windows':
  1174. dcamrec_open = __dll.dcamrec_openW
  1175. dcamrec_open.argtypes = [POINTER(DCAMREC_OPEN)] # DCAMREC_OPENW
  1176. dcamrec_open.restype = DCAMERR
  1177. dcamrec_close = __dll.dcamrec_close
  1178. dcamrec_close.argtypes = [c_void_p]
  1179. dcamrec_close.restype = DCAMERR

dcamapi4.py at commit 893c103, no license · at the source

Overview

Authors: Aleksandra Pidde1, Montserrat Porta-de-la-Riva1, Costanza Agazzi1, Carmen Martínez-Fernández1, Alice Lorrach1, Ashutosh Bijalwan2, Neus Sanfeliu-Cerdán1, Alba Calatayud-Sanchez1, Eric Torralba-Sales3, Ravi Das1, José J. Muñoz2,3,4, Michael Krieg1
  1. ICFO - Institut de Ciéncies Fotóniques, Castelldefels, The Barcelona Institute of Science and Technology,Barcelona, Spain
  2. Centre Internacional de Métodes Numérics en Enginyeria (CIMNE),Barcelona, Spain
  3. Laboratori de Cálcul Numéric (LaCáN), Department of Mathematics, Escola d, Universitat Politécnica de Catalunya (UPC),Barcelona, Spain
  4. Institut de Matemátiques de la UPC- BarcelonaTech (IMTech),Barcelona, Spain
Journal: Nature communications, volume 17, issue 1, article 9083
Dates: received 11 April 2025; accepted 26 June 2026; published online 25 July 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41467-026-75352-7 · PMID 42649163 · PMCID PMC13518797 · OpenAlex W7171225096
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: C. elegans (organism), cellular / molecular (subfield)
Methods: Connectivity, Statistics, Machine learning, Evoked potentials, fMRI & imaging, Single-unit activity, calcium imaging, Smoothing, state filtering, decompositions
Keywords: Decision, Biomedical engineering, Optical imaging, Biological physics, Touch receptors
MeSH: Caenorhabditis elegans*, Locomotion*, Mechanoreceptors*, Mechanotransduction, Cellular*, Animals, Biomechanical Phenomena, Caenorhabditis elegans Proteins, Calcium, Mutation, Touch (* major topic)
Topic: Genetics, Aging, and Longevity in Model Organisms (Aging, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Funding: NIH HHS (P40 OD010440)
Citations: not cited yet (Europe PMC); 87 references in the paper

Abstract

Locomotion - whether walking, running, or crawling - depends on the precise coordination of forces between the body and its surroundings. Two critical factors in this process are the force that resists the relative motion between two bodies, and mechanosensation, the body’s ability to sense and respond to mechanical forces. Together, these processes enable efficient locomotion across diverse environments, yet how body-environment interaction forces shape neural activity in freely moving animals remains poorly understood. Here we show that the ‘gentle touch’ receptor neurons (TRNs) in the Caenorhabditis elegans body wall are sensitive to dynamic surface mechanics. Using a combination of calcium imaging and traction force microscopy in freely behaving animals informed by micromechanical stimulation, connectome-scale simulations, and optimal control theory, we identify friction force and crawling velocity as key determinants of mechanoreceptor activity. Mutations disrupting MEC-4 DEG/ENaC ion channel activity in body wall mechanoreceptors produce lethargic animals with impaired proprioceptive regulation, suggesting functional coupling between surface mechanoreceptors and proprioceptors. Together, our findings reveal that gentle ‘touch’ receptors encode body-environment interaction forces during movement to optimize locomotor energetics.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repositories

Its files are read in the Code ↔ Paper reader above, with 9 matches between paragraphs and lines of code.

gitlab.icfo.net/nmsb/track-live-close-loop

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 893c103631de0f9a14c3602b08c71ca895075d55, 18 February 2025
Languages: Python (9), C/C++ (2)
Size: 16 files, 11 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (4 files), OpenCV (4 files), napari (1 file), SciPy (1 file), tifffile (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
12 files

gitlab.icfo.net/nmsb/cal-free-m-worm

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 10042b3c9404d58295a29e0d1e5d8852475ffa2e, 15 January 2026
Languages: Python (12)
Size: 15 files, 12 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, environment (environment.yml)
Not found: license file, CITATION.cff, tests, continuous integration, documentation
Tools: NumPy (11 files), SciPy (9 files), Matplotlib (8 files), OpenCV (6 files), pandas (6 files), tifffile (5 files), scikit-image (2 files), Numba (1 file), Plotly (1 file), seaborn (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
13 files

gitlab.icfo.net/nmsb/traction-force-worm

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: b5946bbc729d8e0cf9ba0b7b5a1840d35057459e, 16 January 2026
Languages: Python (10)
Size: 12 files, 10 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, environment (environment.yml)
Not found: license file, CITATION.cff, tests, continuous integration, documentation
Tools: NumPy (10 files), OpenCV (9 files), SciPy (9 files), Matplotlib (8 files), tifffile (8 files), scikit-image (7 files), imageio (6 files), pandas (2 files), seaborn (2 files), Numba (1 file), Plotly (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
11 files

gitlab.icfo.net/nmsb/net-sim-worm

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 6b87da2d8c30e837565cd990cc443faecc1c1f3c, 18 February 2025
Languages: MATLAB (6)
Size: 12 files, 6 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
7 files

Code availability

The codes are deposited on: https://gitlab.icfo.net/NMSB/traction-force-worm, https://gitlab.icfo.net/NMSB/track-live-close-loop, https://gitlab.icfo.net/NMSB/net-sim-worm, and https://gitlab.icfo.net/NMSB/cal-free-m-worm.

Reproduced under the paper's license (CC BY), from the paper cited above.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 4 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 39 scripts, each with its path and the digest of its content;
  • 9 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

Datasets cited

Data availability

All numerical source data are presented in the supplementary material of the manuscript and available from the corresponding author. In addition, the curvature matrices (10.5281/zenodo.18153808) and all numerical source data (10.5281/zenodo.20340865) were deposited on zenodo.org. All other raw data is available from the corresponding author on request. Source data are provided with this paper.

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 12 authors, 5 keywords, 10 MeSH terms, 1 funder, 81 references.

Cite

This paper

Pidde, A., Porta-de-la-Riva, M., Agazzi, C., Martínez-Fernández, C., Lorrach, A., Bijalwan, A., Sanfeliu-Cerdán, N., Calatayud-Sanchez, A., Torralba-Sales, E., Das, R., Muñoz, J. J., & Krieg, M. (2026). Mechanosensory encoding of surface mechanics optimizes locomotion. Nature communications, 17(1), 9083. https://doi.org/10.1038/s41467-026-75352-7

BibTeX

@article{pidde2026mechanosensory,
author = {Pidde, Aleksandra and Porta-de-la-Riva, Montserrat and Agazzi, Costanza and Martínez-Fernández, Carmen and Lorrach, Alice and Bijalwan, Ashutosh and Sanfeliu-Cerdán, Neus and Calatayud-Sanchez, Alba and Torralba-Sales, Eric and Das, Ravi and Muñoz, José J. and Krieg, Michael},
title = {{Mechanosensory encoding of surface mechanics optimizes locomotion}},
journal = {Nature communications},
year = {2026},
month = jul,
volume = {17},
number = {1},
pages = {9083},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/s41467-026-75352-7},
url = {https://doi.org/10.1038/s41467-026-75352-7},
pmid = {42649163},
pmcid = {PMC13518797}
}

RIS

TY - JOUR
AU - Pidde, Aleksandra
AU - Porta-de-la-Riva, Montserrat
AU - Agazzi, Costanza
AU - Martínez-Fernández, Carmen
AU - Lorrach, Alice
AU - Bijalwan, Ashutosh
AU - Sanfeliu-Cerdán, Neus
AU - Calatayud-Sanchez, Alba
AU - Torralba-Sales, Eric
AU - Das, Ravi
AU - Muñoz, José J.
AU - Krieg, Michael
TI - Mechanosensory encoding of surface mechanics optimizes locomotion
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/07/25
VL - 17
IS - 1
SP - 9083
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/s41467-026-75352-7
UR - https://doi.org/10.1038/s41467-026-75352-7
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-75352-7",
"type": "article-journal",
"title": "Mechanosensory encoding of surface mechanics optimizes locomotion",
"container-title": "Nature communications",
"author": [
{
"family": "Pidde",
"given": "Aleksandra"
},
{
"family": "Porta-de-la-Riva",
"given": "Montserrat"
},
{
"family": "Agazzi",
"given": "Costanza"
},
{
"family": "Martínez-Fernández",
"given": "Carmen"
},
{
"family": "Lorrach",
"given": "Alice"
},
{
"family": "Bijalwan",
"given": "Ashutosh"
},
{
"family": "Sanfeliu-Cerdán",
"given": "Neus"
},
{
"family": "Calatayud-Sanchez",
"given": "Alba"
},
{
"family": "Torralba-Sales",
"given": "Eric"
},
{
"family": "Das",
"given": "Ravi"
},
{
"family": "Muñoz",
"given": "José J."
},
{
"family": "Krieg",
"given": "Michael"
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "9083",
"DOI": "10.1038/s41467-026-75352-7",
"PMID": "42649163",
"PMCID": "PMC13518797",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41467-026-75352-7",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
25
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi: [code]
Real-time closed-loop feedback system for mouse mesoscale cortical signal and movement control
Journal: eLife
In common: napari, imageio, tifffile, 8 other tools
[2] doi:10.1371/journal.pcbi.1014571 [code]
SynAPSeg: A novel dataset and image analysis framework for deep learning-based synapse detection and quantification.
Journal: PLoS computational biology
In common: napari, imageio, tifffile, 8 other tools
[3] doi:10.1016/j.xcrm.2026.102766 [code]
A longitudinal single-cell and spatial multiomic atlas of pediatric high-grade glioma.
Journal: Cell reports. Medicine
In common: imageio, tifffile, Numba, 8 other tools, cellular / molecular
[4] doi:10.1038/s41598-026-43301-5 [code]
Automated analysis of zebrafish vascular networks using the VISTA-Z pipeline.
Journal: Scientific reports
In common: napari, imageio, Plotly, 7 other tools
[5] doi:10.1038/s41598-026-57519-w [code]
Automated segmentation of neurons and spinal cord structures in immunofluorescence images using SpineDL.
Journal: Scientific reports
In common: imageio, tifffile, Numba, 7 other tools
[6] doi:10.1038/s41598-026-54384-5
Optimization of connectome weights for a neural network model generating both forward and backward locomotion in C. elegans.
Journal: Scientific reports
In common: C. elegans, 7 references
[7] doi:10.1038/s41467-026-73045-9 [code]
Aberration-aware 3D localization microscopy via self-supervised neural-physics learning.
Journal: Nature communications
In common: napari, imageio, tifffile, 6 other tools, cellular / molecular
[8] doi:10.7554/elife.109717 [code]
Retrosplenial cortex enables context-dependent goal-directed sensorimotor transformation.
Journal: eLife
In common: imageio, tifffile, Numba, 7 other tools
[9] doi:10.1038/s41467-026-72709-w [code]
An epifluorescence microscope design for naturalistic behavior and cellular activity in freely moving Caenorhabditis elegans.
Journal: Nature communications
In common: imageio, tifffile, OpenCV, 6 other tools, C. elegans, cellular / molecular
[10] doi:10.1038/s41467-026-72710-3 [code]
A modular multi-color fluorescence microscope for simultaneous tracking of cellular activity and behavior.
Journal: Nature communications
In common: tifffile, OpenCV, scikit-image, 4 other tools, C. elegans, 2 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.