Re: [micro-manager-general] Andor iXon+, iXon3 bug?, need help
Status: Beta
Brought to you by:
nicost
|
From: Lukas H. <Luk...@im...> - 2020-03-12 16:27:46
|
Hi Pedro,
I am using the 64bit version.
ImageJ.cfg is set with -Xmx6000m
The Sequence Buffer Size is 512MB which can hold 2048 images.
The computer has 32Gb of RAM.
Single Andor camera:
With the old adapter the average return time of
mmc.popNextTaggedImage(); is 1ms (2x binning --> 256x256 pixel, 16bit)
With the new adapter (past 14.April19) the average return time of
mmc.popNextTaggedImage(); is 18ms (exactly the same config file, just
changed mmgr_dal_Andor.dll)
With the Multi Camera adapter:
old adapter: 2ms
new adapter: 36ms --> not sufficient for 100fps (2x 50fps)
I am also curious why the Multi Camera adapter doubles the time to
return a single image.
With the "new" adapter the Sequence Buffer fills up quite fast (observed
with Sequence Buffer Monitor).
With the "old" adapter the Sequence Buffer Monitor shows rarely 1-2 images.
I can't just increase the buffer size, it would exceed due to the long
recording time.
Also: the System is tracking on the camera stream, therefore a large
amount of images in a huge buffer causes a fatal delay for the tracker.
Further Interesting:
With "Trigger: Software", on the "new" adapter the cameras are slowing
down a lot and therefore the buffer is kept below 100 images..
But with external Trigger the buffer overflow occurs quite quick (but
the cameras stay at pace).
The readout time of the cameras is indicated with about 16ms.
The script i used to investigate in the timings:
mm.scripter().resetInterpreter(); //Reset Interpreter to get rid of old
stuff
mm.scripter().clearMessageWindow(); //Clear Script output window
/**
* A burst aquisition test script
*/
import org.micromanager.interal.utils.JavaUtils;
//import org.micromanager.data.Datastore;
// User defined variables:
int nrFrames = 1000;
int loopSleepTime = 3;
// defining variables
long taggedTime = 0;
long endSequenceTime = 0;
int loopCount = 0;
// stop running acquisitions
if (mmc.isSequenceRunning()) {
mmc.stopSequenceAcquisition();
}
// RW ram store
storeRW = mm.data().createRewritableRAMDatastore();
// Create a display to show images as they are acquired.
mm.displays().createDisplay(storeRW);
// actual acqusition in a try block to catch errors
try{
// start acqusition and run until it is stopped by command
// the sequence acquistion with preset number of Images did cause problems
mmc.startContinuousSequenceAcquisition(0);
// Set up a Coords.CoordsBuilder for applying coordinates to each image.
builder = mm.data().getCoordsBuilder().z(0).channel(0).stagePosition(0);
while (mmc.getRemainingImageCount() > 0 ||
mmc.isSequenceRunning(mmc.getCameraDevice())) {
if (mmc.getRemainingImageCount() > 0) {
timeStart = System.currentTimeMillis();
tagged = mmc.popNextTaggedImage();
timeEnd = System.currentTimeMillis();
taggedTime = taggedTime + (timeEnd - timeStart);
frameNumber = tagged.tags.getInt("ImageNumber");
// stop sequence after nrFrames images
if (frameNumber >= nrFrames) {
timeStart = System.currentTimeMillis();
print("stop sequence");
mmc.stopSequenceAcquisition();
print("sequence stopped");
timeEnd = System.currentTimeMillis();
endSequenceTime = taggedTime + (timeEnd - timeStart);
}
// for visualisation
image = mm.data().convertTaggedImage(tagged,
builder.time(0).build(), null);
storeRW.putImage(image);
print("image Nr.: " + frameNumber);
loopCount++;
}
else {
java.lang.Thread.sleep(loopSleepTime);
}
}
}
catch (Exception exception) {
print(exception + " - something went wrong");
}
if (mmc.isSequenceRunning()) {
mmc.stopSequenceAcquisition();
}
storeRW.close();
print ("acqusition done");
print ("sum tagged time: " + taggedTime);
print ("end sequence time: " + endSequenceTime);
Thanks for helping me.
kind regards Lukas
On 2020-03-12 10:07, Pedro Almada wrote:
> Hi Lukas,
>
> Just as a sanity check, have you set the circular memory buffer to an
> appropriate size?
> https://micro-manager.org/wiki/Micro-Manager_Configuration_Guide#Memory_Settings
>
>
> Kind regards,
> Pedro Almada
>
> On Wed, 11 Mar 2020 at 18:04, Lukas Hille <Luk...@im...
> <mailto:Luk...@im...>> wrote:
>
> Hi,
>
> I need help with two Andor cameras.
>
> Two Andor cameras are used in dual view (Multi Camera adapter with
> Andor: iXon+ and Andor: iXon3).
> Acquisition is done by a burstAcquisition macro (equal to the
> script),
> but the described behavior applies also to MDA.
> With Frame transfer enabled and at higher Acquisition speeds
> (binning 2,
> 0.9us vertical clock, 20ms exposure, full ROI) i get an buffer
> overflow.
>
> It appears that the device adapter before 14.April2019 "old" returns
> very quick from mmc.popNextTaggedImage() and therefore produces no
> buffer overflow, while the adapter after 14.April2019 "new" takes
> a very
> long time to return from this function.
> This also occurs with only one Camera in use, but with two cameras
> the
> return time is to long to handle the data flow.
>
> A second issue is, that with Multi Camera adapter, the camera
> referring
> to channel 0 (independent which one) stops acquiring after some time
> (~60.000 images in Trigger: software).
> This applies to the "old" and the "new" Andor device adapter.
>
> With Multi Camera adapter and external trigger (one source for both
> cameras, Trigger set to External on both cameras), the camera
> referring
> to channel 0 stops acquiring within 0 to some thousand images)
>
> I don't get any debugging error message with the new adapter.
> With the old adapter i get for example: "GetNumberNewImages error:
> first: 3473 last: 3473" for the camera on channel 0 before it
> stops working.
>
> The goal would be to acquire about 200,000 time points with external
> trigger at 20ms exposure time.
>
> I tried to understand the differences in the code from commits on
> 14.April, but I didn't figure out why this makes a difference for the
> popNextTaggedImage() function.
> Also: the error message "GetNumberNewImages error:" doesn't make any
> sense to me, referring to the situation that no new images are
> acquired.
>
> I would be very happy to get assistance on this one.
>
> Software:
> AndorDriverPack2 - 2.103.30031.0
> Micro-Manager 2.0.0-gamma1 20200222
> mmgr_dal_Andor.dll from 1.04.2019, 16.04.2019 and 22.02.2019
> (tried many
> many more)
>
> best
> Lukas
>
> --
> ____________________________________________
> Lukas Hille, M.Sc.
> microscopy engineer
> Luk...@im... <mailto:Luk...@im...>
> M +43 660 349 169 3
>
> Department of Neurobiology, University of Vienna
> Campus-Vienna-Biocenter 1
> 1030 Vienna
> AUSTRIA
>
> https://neuro.univie.ac.at/
> https://www.imp.ac.at/groups/manuel-zimmer/
> Part of Vienna BioCenter
> www.viennabiocenter.org <http://www.viennabiocenter.org>
> ____________________________________________
>
>
>
> _______________________________________________
> micro-manager-general mailing list
> mic...@li...
> <mailto:mic...@li...>
> https://lists.sourceforge.net/lists/listinfo/micro-manager-general
>
>
>
> _______________________________________________
> micro-manager-general mailing list
> mic...@li...
> https://lists.sourceforge.net/lists/listinfo/micro-manager-general
--
____________________________________________
Lukas Hille, M.Sc.
microscopy engineer
Luk...@im...
M +43 660 349 169 3
Department of Neurobiology, University of Vienna
Campus-Vienna-Biocenter 1
1030 Vienna
AUSTRIA
https://neuro.univie.ac.at/
https://www.imp.ac.at/groups/manuel-zimmer/
Part of Vienna BioCenter
www.viennabiocenter.org
____________________________________________
|