class_docstr: This is the Lytro RAW format for the original F01 Lytro camera.
  The raw format is a 12bit image format as used by the Lytro F01
  light field camera. The format will read the specified raw file and will
  try to load a .txt or .json file with the associated meta data.
  This format does not support writing.
  
  
  Parameters for reading
  ----------------------
  meta_only : bool
      Whether to only read the metadata.
class_docstr_tok: ["This","is","the","Lytro","RAW","format","for","the","original","F01","Lytro","camera",".","The","raw","format","is","a","12bit","image","format","as","used","by","the","Lytro","F01","light","field","camera",".","The","format","will","read","the","specified","raw","file","and","will","try","to","load","a",".txt","or",".json","file","with","the","associated","meta","data",".","This","format","does","not","support","writing",".","Parameters","for","reading","--","--","--","--","--","--","--","--","--","--","--","meta_only",":","bool","Whether","to","only","read","the","metadata","."]
code: def rearrange_bits(array):
      # Do bit rearrangement for the 12-bit lytro raw format
      # Normalize output to 1.0 as float64
      t0 = array[0::3]
      t1 = array[1::3]
      t2 = array[2::3]
  
      a0 = np.left_shift(t0, 4) + np.right_shift(
          np.bitwise_and(t1, 240), 4
      )
      a1 = np.left_shift(np.bitwise_and(t1, 15), 8) + t2
  
      image = np.zeros(LYTRO_F01_IMAGE_SIZE, dtype=np.uint16)
      image[:, 0::2] = a0.reshape(
          (LYTRO_F01_IMAGE_SIZE[0], LYTRO_F01_IMAGE_SIZE[1] // 2)
      )
      image[:, 1::2] = a1.reshape(
          (LYTRO_F01_IMAGE_SIZE[0], LYTRO_F01_IMAGE_SIZE[1] // 2)
      )
  
      # Normalize data to 1.0 as 64-bit float.
      # Division is by 4095 as the Lytro F01 saves 12-bit raw data.
      return np.divide(image, 4095.0).astype(np.float64)
  
imports: import os
  import json
  import struct
  import logging
  import numpy
  from ..core import Format
  from ..v2 import imread
label_desc: Use image node_id 2 for calling the LytroF01RawFormat obj's underlying member method code with example usage: obj.rearrange_bits(array) and returns: np