Seeing timepoints for frames in Fiji

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Seeing timepoints for frames in Fiji

Steto
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Seeing timepoints for frames in Fiji

Kyle Douglass
Hi Steven,


On 03/10/2018 01:38 AM, Steto wrote:
> When performing a Multi-D acquisition the window with your image shows the
> frame count above the image and time in seconds below.  Is there a way to
> get the timepoints to show up when you open the file in Fiji?

I am not sure whether Micro-Manager writes its own time stamps to the
metadata, but some cameras will write their hardware-determined time
stamps for each frame. I placed an example excerpt at the end of this
e-mail from one of the metadata files that was created during a Multi-D
acquisition in our lab. The acquisition was taken in Micro-Manager 2
beta from a Photometrics Prime sCMOS. The format of the JSON data will
likely be both Micro-Manager version- and camera manufacturer-specific,
but hopefully it gives you an idea of what to look for in your own
metadata files.

> Also, how
> reliable are the timepoints?
I would not place a high degree of confidence in time stamps created in
Micro-Manager because of the variable delay between the camera's
acquisition of the image and the time that it enters the circular
buffer; the hardware timestamps from the camera should be pretty
reliable, though.

HTH,
Kyle

"userData": {
     "PVCAM-FMD-TimestampEofNs": {
       "PropVal": "14592695606400",
       "PropType": "String"
     },
     "PVCAM-FMD-RoiMD": {
       "PropVal":
"[{\"nr\":1,\"coords\":[516,1363,1,435,1282,1],\"borNs\":35864992176000,\"eorNs\":35864992176000}]",
       "PropType": "String"
     },
     "TimeStampMsec": {
       "PropVal": "542384726526.08",
       "PropType": "String"
     },
     "PVCAM-FMD-RoiCount": {
       "PropVal": "1",
       "PropType": "String"
     },
     "PVCAM-FMD-ExposureTimeNs": {
       "PropVal": "9993600",
       "PropType": "String"
     },
     "PVCAM-ReadoutTime": {
       "PropVal": "11",
       "PropType": "String"
     },
     "PVCAM-FrameNr": {
       "PropVal": "1",
       "PropType": "String"
     },
     "PVCAM-FMD-ColorMask": {
       "PropVal": "None",
       "PropType": "String"
     },
     "Prime Camera-StartTime-ms": {
       "PropVal": "542384726509.06",
       "PropType": "String"
     },
     "PVCAM-FMD-BitDepth": {
       "PropVal": "16",
       "PropType": "String"
     },
     "PVCAM-FMD-ImpliedRoi": {
       "PropVal": "[516, 1363, 1, 435, 1282, 1]",
       "PropType": "String"
     },
     "PVCAM-FMD-FrameNr": {
       "PropVal": "229",
       "PropType": "String"
     },
     "PVCAM-CameraHandle": {
       "PropVal": "0",
       "PropType": "String"
     },
     "PVCAM-TimeStamp": {
       "PropVal": "180",
       "PropType": "String"
     },
     "PVCAM-TimeStampBOF": {
       "PropVal": "169",
       "PropType": "String"
     },
     "PVCAM-FMD-TimestampBofNs": {
       "PropVal": "14592689952000",
       "PropType": "String"
     },
     "WaitInterval": {
       "PropVal": 0,
       "PropType": "Double"
     }
   },

--
Kyle M. Douglass, PhD
Post-doctoral researcher
The Laboratory of Experimental Biophysics
EPFL, Lausanne, Switzerland
http://kmdouglass.github.io
http://leb.epfl.ch


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Seeing timepoints for frames in Fiji

Steto
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Seeing timepoints for frames in Fiji

Kyle Douglass

Hi Steven,


On 03/13/2018 08:31 AM, Steven Ceto wrote:
Hi Kyle,

Thanks for the reply.  My apologies for my lack of familiarity with the metadata structure.  Is the excerpt you provided the metadata for one frame?

You're welcome. If you only have one position from your MDA, or you've selected the option to place all positions in the same file, then the metadata is a single text file. The data inside is structured so that a summary block appears first, then the property values for everything in your MM configuration are written for every frame (this can produce quite large metadata files if you have a lot of frames).

Yes, the excerpt I included was taken from the block for the first frame. This block started with the string "FrameKey-0-0-0". This may be different depending on your MM version.

The metadata follows the JSON standard for encoding data as a string that is both human and machine-readable: https://json.org/

Would I have to write some java script to get fiji to retrieve the corresponding piece of metadata for each frame in order to see it in the GUI?

The metadata is just a text file, so in principle you could see it just by opening it as a text file in Fiji.

If you want to automatically extract values from the JSON data, though, then you will need to do some more work. There are many approaches. For example, Python has built-in tools for easily parsing JSON; if the json module is included in Jython 2.7, then you could parse the metadata files using Fiji's Python scripting interface. https://docs.python.org/2/library/json.html

There is also a related thread that may be worth reading here for alternative solutions: http://micro-manager.3463995.n2.nabble.com/metadata-tc7579438.html#none

Good luck!
Kyle


Thanks,
Steven



On Mar 12, 2018 12:43 AM, "Kyle Douglass" <[hidden email]> wrote:
Hi Steven,



On 03/10/2018 01:38 AM, Steto wrote:
When performing a Multi-D acquisition the window with your image shows the
frame count above the image and time in seconds below.  Is there a way to
get the timepoints to show up when you open the file in Fiji?

I am not sure whether Micro-Manager writes its own time stamps to the metadata, but some cameras will write their hardware-determined time stamps for each frame. I placed an example excerpt at the end of this e-mail from one of the metadata files that was created during a Multi-D acquisition in our lab. The acquisition was taken in Micro-Manager 2 beta from a Photometrics Prime sCMOS. The format of the JSON data will likely be both Micro-Manager version- and camera manufacturer-specific, but hopefully it gives you an idea of what to look for in your own metadata files.


Also, how
reliable are the timepoints?
I would not place a high degree of confidence in time stamps created in Micro-Manager because of the variable delay between the camera's acquisition of the image and the time that it enters the circular buffer; the hardware timestamps from the camera should be pretty reliable, though.

HTH,
Kyle

"userData": {
    "PVCAM-FMD-TimestampEofNs": {
      "PropVal": "14592695606400",
      "PropType": "String"
    },
    "PVCAM-FMD-RoiMD": {
      "PropVal": "[{\"nr\":1,\"coords\":[516,1363,1,435,1282,1],\"borNs\":35864992176000,\"eorNs\":35864992176000}]",
      "PropType": "String"
    },
    "TimeStampMsec": {
      "PropVal": "542384726526.08",
      "PropType": "String"
    },
    "PVCAM-FMD-RoiCount": {
      "PropVal": "1",
      "PropType": "String"
    },
    "PVCAM-FMD-ExposureTimeNs": {
      "PropVal": "9993600",
      "PropType": "String"
    },
    "PVCAM-ReadoutTime": {
      "PropVal": "11",
      "PropType": "String"
    },
    "PVCAM-FrameNr": {
      "PropVal": "1",
      "PropType": "String"
    },
    "PVCAM-FMD-ColorMask": {
      "PropVal": "None",
      "PropType": "String"
    },
    "Prime Camera-StartTime-ms": {
      "PropVal": "542384726509.06",
      "PropType": "String"
    },
    "PVCAM-FMD-BitDepth": {
      "PropVal": "16",
      "PropType": "String"
    },
    "PVCAM-FMD-ImpliedRoi": {
      "PropVal": "[516, 1363, 1, 435, 1282, 1]",
      "PropType": "String"
    },
    "PVCAM-FMD-FrameNr": {
      "PropVal": "229",
      "PropType": "String"
    },
    "PVCAM-CameraHandle": {
      "PropVal": "0",
      "PropType": "String"
    },
    "PVCAM-TimeStamp": {
      "PropVal": "180",
      "PropType": "String"
    },
    "PVCAM-TimeStampBOF": {
      "PropVal": "169",
      "PropType": "String"
    },
    "PVCAM-FMD-TimestampBofNs": {
      "PropVal": "14592689952000",
      "PropType": "String"
    },
    "WaitInterval": {
      "PropVal": 0,
      "PropType": "Double"
    }
  },

--
Kyle M. Douglass, PhD
Post-doctoral researcher
The Laboratory of Experimental Biophysics
EPFL, Lausanne, Switzerland
http://kmdouglass.github.io
http://leb.epfl.ch



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

-- 
Kyle M. Douglass, PhD
Post-doctoral researcher
The Laboratory of Experimental Biophysics
EPFL, Lausanne, Switzerland
http://kmdouglass.github.io
http://leb.epfl.ch

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general