Author Topic: Is this a known issue and if so is there a workaround?  (Read 199 times)

Acen1996

  • Newbie
  • *
  • Posts: 1
    • View Profile
Is this a known issue and if so is there a workaround?
« on: November 12, 2024, 11:16:45 PM »
Hi,

We use a Chronos 1.4 (0.6 firmware) to shoot typically 50 blocks (segments) of 400 images at close to max frame rate (995fps). FWIW each segment is started at about 5 seconds interval, using an external TTL trigger on the BNC input of trigg1.

I would expect the exported images to be frame_000001.tiff->frame_000400.tiff for the first block, then 401->800 for the second block and so on. But instead the first block only has 398 images (frame_000001.tiff->frame_000398.tiff) while the second and the others (except the last) have the expected 400 images (399->798, 799...). Finally, the last block contains 403 images, the last 3 of which seem to belong to the beginning of the first block.

Is this a known issue and if so is there a workaround?

Since my explanation may be confusing, don't hesitate to ask for details.

hummingbirdography

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Instagram
Re: Is this a known issue and if so is there a workaround?
« Reply #1 on: November 13, 2024, 02:27:36 PM »
I did some testing and tried to reproduce this issue. I suspect what you're encountering may be related to your trigger configuration. I wrote a python script which follows. It uses the API to create 50 segments, each exactly 400 frames. I tested this with a Chronos 1.4 and two different firmware versions: 0.5.1, and also the latest release, 0.7.2

Code: [Select]
#!/usr/bin/python3
import time
import requests

ipAddress = '192.168.12.1'
totalFrames = 20000
totalSegments = 50
segmentInterval = 5

print(f'Flushing any previously recorded data for Chronos at {ipAddress}')
requests.post(f'http://{ipAddress}/control/flushRecording', json = {})

print(f'Setting recording frames quantity to {totalFrames}')
requests.post(f'http://{ipAddress}/control/set', json = {'recMaxFrames': totalFrames})

print('Setting recording mode to segmented')
requests.post(f'http://{ipAddress}/control/set', json = {'recMode': 'segmented'})

print(f'Setting recording segments quantity to {totalSegments}, each with a duration of {totalFrames // totalSegments} frames')
requests.post(f'http://{ipAddress}/control/set', json = {'recSegments': totalSegments})

print('Starting first segment recording')
requests.post(f'http://{ipAddress}/control/startRecording', json = {})

for i in range(totalSegments):
    # Wait segment interval
    time.sleep(segmentInterval)

    # Trigger next recording segment
    requests.post(f'http://{ipAddress}/control/set', json = {"ioMappingTrigger": {"source": "alwaysHigh", "invert": True }})
    requests.post(f'http://{ipAddress}/control/set', json = {"ioMappingTrigger": {"source": "alwaysHigh", "invert": False }})
   
    print(f'Recorded segment {i + 1} of {totalSegments}')

# Wait segment interval
time.sleep(segmentInterval)

print('Stopping recording')
requests.post(f'http://{ipAddress}/control/stopRecording', json = {})

Both firmware versions reported the same results through the 'videoSegments' property, so I am guessing this isn't related to the firmware version you're using.

Code: [Select]
[
  {
    "interval": 0.0010051,
    "offset": 0,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 400,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 800,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 1200,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 1600,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 2000,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 2400,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 2800,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 3200,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 3600,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 4000,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 4400,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 4800,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 5200,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 5600,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 6000,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 6400,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 6800,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 7200,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 7600,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 8000,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 8400,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 8800,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 9200,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 9600,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 10000,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 10400,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 10800,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 11200,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 11600,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 12000,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 12400,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 12800,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 13200,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 13600,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 14000,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 14400,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 14800,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 15200,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 15600,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 16000,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 16400,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 16800,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 17200,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 17600,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 18000,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 18400,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 18800,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 19200,
    "exposure": 0.000999511,
    "length": 400
  },
  {
    "interval": 0.0010051,
    "offset": 19600,
    "exposure": 0.000999511,
    "length": 400
  }
]

The segmented recording mode can be a bit challenging to understand while relying on the back of the camera's interface. The API exposes some really useful information which I think might help you troubleshoot this. I'd be delighted to help with this, and am curious how this turns out!
« Last Edit: November 14, 2024, 12:48:09 AM by hummingbirdography »