frelon_separateur_gauche.gif (Frelon_separateur_gauche)

 

especially for ID19 users

 


Introduction
First steps with the FReLoN camera

Macros

How to quit the 'frelon' program ?

Annexes

Introduction

This short manual has been created to facilitate the use of the FReLoN camera. Thanks to it, you can make your first steps with the FReLoN camera very quickly. All the macros for the setup and the acquisition are described. At the end of the manual you can find the listings of the macros to understand how they work and how you can use or improve them for your experiments. Good work...

First steps with the FReLoN camera

How to mount the FReLoN camera ?

First, you have to switch on the Peltier device and the power supply . Now, you have to wait for a moment to reach the correct temperatures.

How to start the FReLoN camera ?

As you know it, a CCD camera mustn't be exposed during is reading time (200 ms in one output mode and 50 ms in four output mode for the FReLoN).So you have to use a shutter. To control it, you have two possibilities:

  1. SPEC sends the acquisition time information to the VCT6  (BNC cable), which informs the FReLoN by its BNC 'integration time' input: The FReLoN camera is a SLAVE.
  2. SPEC sends the acquition time information to the FReLoN (optic fibers), which controls the shutter by the 'control shutter' output of the camera: The FReLoN camera is a MASTER.


In both cases, the images and the communication between SPEC and the FReLoN camera run on the optic fibers.

 

You choose one of this option in function of your experiment. Now, you are ready to run 'spec'.

'frelon' is the name of the special spec version for the FReLoN camera on ID19.

Enter: >frelon

At the beginning or after a boot system, you have to initialize the SDV acquisition system.

For acquisition on 1 output (4 outputs soon available), the available device is the SDV. It is inside TOMOID19 (SUN station name).

To do so from UNIX, prompt enter:

>cd /opt/EDTsdv

>fast1024

>cd

Be sure that the camera and the SDV interface are correctly connected and powered on, otherwise spec will display a serial line error like this:

Getting configuration parmeters from 'SPECD/spec/config'.

Error in communication with frelon serial line.

Can't init serial connection to frelon camera.

Error initializing frelon (SDV) camera.

 

Remark

A macro has been created to make easier the configuration of the SDV.
Its name is initsdv and belongs to fastccdtake.mac file.

>jdo fastccdtake to allows use of these file macros.

>initsdv

At the beginning, you must run the setup command and answer all the questions.

frelon>ccdsetup

Preset the camera with count time (no)?    put 'n'

Start camera acquisition on external signal (no)?    put    'n' if you want the FReLoN in a MASTER mode
                                                                                        'y' if you want the FReLoN in a SLAVE mode

Save the image after counting (no)?    put 'n' to begin.
                                                           After it's an option, only when you are in a SLAVE mode.
                                                           The images are automatically saved if you put 'y'.

Use channel 1, 2, 3, 4 (0=all) (2)?    put 'x'
                                                       'x' corresponds to the fiber optic number used (1 to 4).

Simulates ROIs by software? (no)?    put 'n'
                                                          It's an option. For more information about ROI...

(In the different questions, values in paranthesis are default values)

Now you are ready to take your first image with:

frelon> ccdtake 1  if you are on a MASTER mode.

frelon> ct 1  if you are on a SLAVE mode. (1 is the integration time in second)
It is advised to take this first image to see if the camera is well set up.

An ImageDisplay is open with the acquired image. You are supposed to be familiar with 'onze' image analysis software.

Macros

Several macros have been written to improve the configuration and the image acquisition of the FReLoN camera.

Where are the macros?

Several files contain these macros. The name of these type of files ends in '.mac'.
Most of the general macros are in a file which name is 'ccd.mac' (BLISS macros).
Some special macros for    fast acquisition are in 'fastccdtake.mac' (ID19 macros).
                                                 wafer scanning are in 'wafer.mac' (ID19 macros).

In tomoid19, the .mac files are in the directory:
/users/a/specadm/jmacros/

The run of ccd.mac is automatic. For the other, just enter: frelon>jdo <filename_without.mac>

First macros for easy take

In MASTER mode: • ccdtake<integration time in second(s) number of images>

takes image(s) with the camera. The result is not automatically saved to disk.

ccdlive <exposure time in second(s)>

The FReLoN camera is set in a free acquisition mode. It takes images continiously and displays some statistical data. You can finish image taking by taping '~' ('Shift' + '`~'). ^c also ends image taking but aborts the current image.

frelon>ccdlive 0.1

Images/sec:Last xx.xx Av yy.yy

 • ccdnewfile

sets a new file prefix and initializes the run number. The file name will be: PREFIXnnnn.SUFFIX. It is possible to change this default file name type with special keywords. See internal macro ccdfilename for more information how to do that.

If you put 'y' to the question: Save the image after counting? in the ccdsetup macro,
your image will be automatically saved under this incrementable name.

frelon>ccdnewfile

Do you want to save images after each ct/scan (yes)?
none importance: in MASTER mode, you won't make ct or scan...

CCD File Prefix (xxx)?    put your prefix file name 'xxx'

CCD File Suffix (edf)?     'edf' is the ESRF format

Next run number (1)?     number of your first image '1'

Using prefix "xxx". Next run number is 1.

file "xxx0001.edf"

ccdsave

saves your current image under the file name defined by ccdnewfile.
 
  In SLAVE mode:

  •  • ct<exposure time in second(s)>

    is equivalent to ccdtake (in MASTER mode). The integration time information is sent to the VCT6.

 • ccdnewfile

sets a new file prefix and initializes the run number. The file name will be: PREFIXnnnn.SUFFIX. It is possible to change this default file name type with special keywords. See internal macro ccdfilename for more information how to do that.

If you put 'y' to the question: Save the image after counting? in the ccdsetup macro,
your image will be automatically saved under this incrementable name.

frelon>ccdnewfile

Do you want to save images after each ct/scan (yes)?    'y' or 'n'

CCD File Prefix (xxx)?     put your prefix file name 'xxx'

CCD File Suffix (edf)?     'edf' is the ESRF format

Next run number (1)?     number of your first image '1'

Using prefix "xxx". Next run number is 1.

file "xxx0001.edf"

ccdsave

saves your current image under the file name defined by ccdnewfile. It's not necessary if you put 'y'  to save after each count in the set up. It's only if you want to save not all the images but only few.
 
  Macros for fast acquisition
 

  • To make fast acquisition, you have to follow these stages:
    (We suppose that the FReLoN is mounted, connected and the SDV initialized)

1 ) Configure the FReLoN in MASTER mode:

(How to do that ?)

  • 2 ) Take an image to see if the setup is correct:

    >ccdtake 1

  • 3 ) Run the setup macro for fast acquisition:
  • > fast_setup

    This macro is in fastccdtake.mac.
    Type jdo fastccdtake before if it wasn't already done (for the SDV initialization...).

    Logfile name (name_file.txt)     name_file.txt

    Number of sequences (10)     3

    To acquire faster, the images are stocked first in the TOMOID19 RAM
    before beeing saved into the station hard disk or in NICE.
    So the number of acquired images is limitated and the acquisition is sequenced.

    Number of images per sequence (100)    100

    If you are in binning mode, the maximum is 100.
    If you are in normal mode, the maximum is 25.

    Integration time (seconds) (0.05)     0.05

    Directory where to save the images (/tmp)    /tmp  this directory corresponds to the TOMOID19 RAM.

  • Type prefix for image names (test)    test

    Number of the first image (0)     0

    Type suffix for image names of fasttake (edf)    edf

    Binning ? (no)     y    the binning mode allows to acquire faster.

    You must obtain this message:

  • You selected:

    Number of sequences = 3

    Number of images per sequence = 100

    Integration time = 0.05 sec

    Target directory for images = /tmp/test0000.edf

    Binning mode = yes

    Logfile name = name_file.txt

    Execution time expected = 120 secs

    Disk space required in /tmp = 150 Mbytes All these information are saved in the defined log file. 4 ) Check free space:

    To know free space value in your /tmp directory, you must enter in another terminal X window:

    >df -k    the given value is in kbytes

    5 ) Run the acquisition:

    Now, you are ready to run the acquisition with:

    > fast

    The date and the hour at which you take the first image and:


of each sequence are also recorded in the defined log file.

6 ) Before running another acquisition:

  • the camera starting time
  • the image acquisition time
  • the writing data on disk time
  • the total time

- Copy the images on the tomoid19 external hard disk or in NICE to make free space on /tmp directory.

> cd /tmp

> mv xxx*.edf /data/.....  (external hard disk) or

> mv xxx*.edf /data/id19/inhouse/nov98/  (NICE) Be careful: After 100 days, the images will be removed.

- Remove the /tmp images:

> /bin/rm xxx*.edf

7 ) To know the used space disk, use this command:

> du -k     the given value is in kbytes

8 ) To watch the images

To watch the acquired images, there is a macro which allows to make a film with them. It is called 'film'.

>film

Time to keep every image (1)    1    time in second(s)

Type prefix for image names of fasttake (/data)  /data/id19/inhouse/nov98/.../test  include path and prefix

Type suffix for image names of fasttake (edf)    edf

Number of first image to be shown (0)     0

Number of last image to be shown (300)    300

Row size? (1024)     512
                              1024 is the total image size
                              512 is the binning image size
                              x if you use ROI

Col size? (1024)     512

The film begins and the image_display 'onze' is open. If it's not the case, you should open it before running the film macro with the command:    >camera_online

  • As soon as the film is running, the name of the actual image is written on the screen.
    You can stop the film with ' n' or ' p' keys. This message will follow:

    Type 'n' for next, 'p' for previous, 'c' for continue or 'e' for exit.
     

    9 ) Macro of image treatment

    'Subs_film' is a macro that subtracts a model image (without phenomena) from a sequence of images. This allows to remove the fixed defects and underline the phenomena you want to see.

    >subs_film

    Model file name (model.edf)     model.edf name of an image without phenomena

    Type directory where to find images to correct (/data)    /data/id19/inhouse/nov98/...

    Type prefix for image names (xxx)    xxx

    Type suffix for image names (edf)    edf

    Number of the first image (1)     0

    Number of the last image (300)     300

    Row size (512)     512

    Col size (512)     512

    The corrected images are saved in the same directory with the following name: xxx_C.edf

Short descriptions of each macro

These commands have been classified in alphabetical order.

The macros written in italic are internal macros. They are used from other macros. They are normally not called by the user. C   F   H   I    M   R   S   T   W

 

C • camera_online

starts the ImageDisplay 'onze'. The macro tests first if it isn't already running.

ccdbin x x

sets a binning ratio for the camera. The binning is done in hardware on the camera.
Only ccdbin 2 2 (binning mode 512*512 image is available).
ccdbin 1 1 corresponds to non binning mode 1024*1024 image.

ccd_createarray

defines or redefines the shared image_data.

ccd_display

starts the online display and returns its pid (process identification)

ccdfilename(prefix, number, suffix)

returns filename created from prefix number and suffix. The standard format will be <prefix>nnnn<suffix>. This format can be changed by adding keywords to the filename.

#n [digits] This sequence will be replaced by the current scan number.

[digits] is optional and specifies the number of digits to put.

Example: #n4 will be replaced by 0011.

#p [digits] This sequence will be replaced by the current scan point number.

#r [digits] This sequence will be replaced by the current run number.

If a keyword is present in either the prefix or the suffix, the filename will be <prefix><suffix> without the run number.

ccdlive <exposure time in second(s)>

The FReLoN camera is set in a free acquisition mode. It takes images continiously and displays some statistical data. You can finish image taking by taping '~' ('Shift' + '`~'). ^c also ends image taking but aborts the current image.

To use this macro, you should be in MASTER mode (Cf. ccdsetup).

frelon>ccdlive0.2

Images/sec:Last xx.xx Av yy.yy

This indicates the last and the current number of images/seconds the FReLoN acquires.

ccdload <filname> [<xsize> <ysize>]

loads an image in the spec version of ImageDisplay ('onze') so calculus can be performed on it. If no size is given 1024*1024 is assumed. Otherwise xsize=rows; ysize=columns.

If 'onze' is not running yet, use camera_online.

• ccdnewfile

sets a new file prefix and initializes the run number. The file name will be: PREFIXnnnn.SUFFIX. It is possible to change this default file name with special keywords. See internal macro ccdfilename for more information how to do that.

frelon>ccdnewfile

Do you want to save images after each ct/scan (yes)?

If you put ' y', the images will be automatically saved in SLAVE mode.

CCD File Prefix (xxx)?

CCD File Suffix (edf)?

Next run number (1)?

Using prefix "xxx". Next run number is 1.

(-> file "xxx0001.edf")

ccdoff

The camera will no longer be started at every scan points ( SLAVE mode).

ccdoffset

sets the image background to a desired level (100 in general to avoid negative values).

frelon>ccdoffset

Channel to adjust (0=all) (4)?

Enter the number of the used optic fiber

Desired output level (100)?

Integration time (in msec) (100)?

Error tolerance (0.5)?

No binning

Closing SHUTTER...

OK!

ccdon

The camera will be started automatically at every scan points ( SLAVE mode).

ccdread

reads the image_data.

ccdreset

resets the camera. Use it when there is no response to any command.

ccdroi

defines the size of the Region Of Interest you want to study thanks to the image acquisition instead of acquiring a 1024*1024 complete image. You can choose hardware or software ROI thanks to ccdsetup.

frelon> ccdroi

Use a region of interest (ROI) (yes)?

'n' --> exit

'y'-->ROI GENERATED BY HARDWARE. Use ccdsetup to select soft ROI

ROI: from row (0)?

ROI: to row (1023)?

ROI: from column (0)?

ROI: to column (1023)?

The ROI you selected appears on the left top of the ImageDisplay. You are ready for your acquisition.

• ccdsave

saves the global image array image_data to the file defined by ccdnewfile.
Use it if you don't want to save all your images but only few (in SLAVE and MASTER modes).

ccd_save ( file, image, flag)

saves an image array to the file. The information for the header is taken from the current global variables with the function headerinfo. If bit 1 of flag is set, there will be no test if the file already exists. The old file will be overwritten.

ccdsaveconf

saves camera DAC values to a file.

ccdsetup

sets the configuration of the camera.

frelon>ccdsetup

Preset the camera with count time (no)?

If you enter 'y' Prolong ccd exposure time [s] (0)?

The time in seconds the camera will acquire. A zero value means forever.

                  'n' skip this option

Start camera acquisition on external signal (no)?    put    'n' if you want the FReLoN in a MASTER mode
                                                                                        'y' if you want the FReLoN in a SLAVE mode

Save the image after counting (no)?    put ' n' to begin.
                                                           After it's an option, only when you are in a SLAVE mode.
                                                           The images are automatically saved if you put 'y'.

Use channel 1, 2, 3, 4 (0=all) (2)?    put 'x'
                                                       'x' corresponds to the fiber optic number used (1 to 4).

Simulates ROIs by software? (no)?    put ' n'
                                                          It's an option. For more information about ROI...

Remark: according to the optics used in ID19, you should select the output 3 (mode 3) to have your image in the right sense. '0' mode uses the four outputs (soon available).

  • ccdstart

ccdstatus

displays values of internal voltages of the camera. For maintenance only.

ccdsum

takes <no of cycles> images and adds them up in another array. The sum array is shared and can therefore be watched life with the online display. The shared array is of type unsigned long (max number of counts per pixel: 2^32). The sum array is saved to disk after measurement.

• ccdtake<integration time in second(s) number of images>

takes image(s) with the camera. The result is not automatically saved to disk.

ccd_temp

displays CCD and camera temperatures + alarms, if any.

• create_dark

the actual image is taken as dark. Used in combination with create_ref and flat. Should be run before create_ref and flat.

create_ref

the actual image is taken as reference. Used in combination with create_dark and flat. create_dark should be run before create_ref.

avglevel is the level corresponding to relative value 1.
  F • fast

includes fasttake , fastsave and write_fastsettings

fast_setup

is a setting macro for fast acquisition thanks to fast macro. You can select several parameters in answering the different questions. You have to run fast_setup before fast.

frelon> fast_setup

Logfile name

Number of sequences (3)

Number of images per sequence (10)

Integration time (seconds) (0.05)

Directory where to save the images (/tmp)

Type prefix for image names of fasttake (test)

Sequence number (0)

Type suffix for image names of fasttake (edf)

Binning ?(NO)

Now you can run fast.

fastsave

save an image sequence taken with fasttake.

fasttake

allows fast acquisition up to 100 images per sequence in binning mode and up to 25 images per sequence in no binning mode. After the acquisition, the 100 images (or 25) are saved on the hard disk (/tmp directory) .

• film

makes a film with stored images. The file name must be like: xxx0000.edf (=defined by ccdnewfile)

frelon> film

Time to keep every image (1)

Type prefix for image names of fasttake (test)

Type suffix for image names of fasttake (edf)

Sequence number (0)

Number of last image to be shown (10)

BINNING USED? (no)

flat

flatfield correction on the actual image. The original image is lost. create_darkand create_ref should be run first if the dark or reference is changed.

flatfield

performs flatfield correction on stored images (image, reference and dark). Result is image_data=(image-dark)/(reference-dark)*avglevel.

Result is unsigned short and relative value 1 corresponds to avglevel. If no size is given, 1024*1024 is assumed. Otherwise, xsize=rows; ysize=columns.

Gives a fmt_read error which is of no importance.
  Hheaderinfo

puts information about the last image taken into the array header.
  I  • initsdv

initializes the SDV. Mmakeref

sets the sample (mvr finez) to create a reference image. Should be run before create_ref.
 
  Rrefoff

refon

rename_files

rename a sequence of files you acquired with a name that you want to change.

frelon>rename_files

Type directory where to find images to rename

Type prefix for OLD image names

Type suffix for OLD image names

Number of the first OLD image

Number of the last OLD image

Type prefix for new image names

Type suffix for new image names Ssavenow

saves in any case the actual image_data, under the name defined previously by ccdnewfile.

frelon> savenow

Image saved to file "xxx0001.edf".

subs

substracts two successive images (with same acquisition time). '2000' level is added to the first image to avoid negative values.

• subs_film

subtracts a model image (without phenomena) from a sequence of images. This allows to remove the fixed defects and underline the phenomena you want to see.

frelon>subs_film

Model file name

Type directory where to find images to correct

Type prefix for image names

Type suffix for image names

Number of the first image

Number of the last image

Row size

Col size

substrdark <image> <dark> [<xsize> <ysize>]

performs substraction of dark with stored images (image and dark). The result is image_data=image+offset-dark. The offset is fixed at 1000 to avoid negative values. If no image size is given, 1024*1024 is assumed. Otherwise, xsize=rows; ysize=columns. The resulting image isn't saved automatically.
  Ttimetest <n> <t>

gives the acquisition time for <n> images which are acquired with a <t> integration time.

tomoscan

directory, filename and ccdsetup.

acquisition of dark images

acquisition of reference images

acquisition of scan

(... under construction)
  W • write_fastsettings

makes a logfile of fast macro. This file will record:

- the number of sequences

- the number of images per sequence

- the integration time

- the target directory for images

- binning mode or not

- the logfile name

- the execution time expected

- the disk space required in /tmp
 

How to quit the 'frelon' program ?

To quit the 'frelon' program, just enter:

frelon>quit

and after:

>exit    to quit the terminal session.

ANNEXES

 

Annexe 1: Technical datas on FReLoN camera

 

 

Annexe 2: What is a ROI ?

ROI are the initials for Region Of Interest. For some experiments, you just need a certain part of the 1024*1024 pixel image. So you create a ROI. For that, you have different possibilities. You choose one of them thanks to the macro ccdsetup. • Software ROI The camera read the entire image and SPEC manages the ROI. The display in 'onze' is faster because of the smaller size of the image. • Hardware ROI The camera manages the ROI. In 'slow ROI' mode, the external part of the ROI is read 2 lines by 2 lines. So you read the image part you don't want twice faster. In 'fast ROI mode', the external part of the ROI is read in bulk. So you save a lot of time. If you want to go as fast as possible, using a ROI, this 'fast ROI mode' is the best way. However 'fast ROI mode' is only available on the FReLoN camera 5 serial number (Multi Pinned Phase technology) because it includes a feature, called antiblooming, which prevents very brilliant pixels from expanding over their neighbor.
 

Annexe 3: What is the binning mode ?

The binning mode consists in adding the contents of four pixel and putting the result in one pixel. So you obtain a 512*512 pixel image instead of having a 1024*1024 pixel image. The advantage of this mode is that the acquisition and the writing times are around 4 times shorter, but the drawback is that you loose spatial resolution.

Annexe 4: 'Onze' image display documentation

'Onze' documentation
 

Annexe 5: The FReLoN camera can control a shutter

As you know it, if a CCD camera is exposed during the readout time, the quality of your acquired image will be degraded (Only if your acquisition time is not negligible with respect to the readout time: 50 ms in 4 outputs and 200 ms in 1 output). To avoid this you have to use a shutter.

Two OPTILAS fast shutters are available at the detector pool ESRF group
(contact John Morse or Marc Diot)
The openning dimensions are 5*10 mm2 for the first one and 8*8 mm2 for the second one.

The ID19 group has just bought the same as the second one and René Chagnon prepared another one for the beamline, which is going to be characterised. Its openning dimensions are bigger (up to 5*3 cm2) but the risen and fallen times are consequently more longer.
For more technical datas on these different shutters, please consult the technical sheets in annexe.

The ideal trigger situation is that the FReLoN camera control the shutter. Indeed, the FRELoN camera has a 'control shutter' output on its back side, connected on open collector. • When there is light, the transistor is conductor and the level is 0. (output at the ground) • When there is no light, the transistor is non conductor and the level is 1. (output at +5V)
So this 'control shutter' output works in inversed TTL. Because the 'control shutter' output is in open collector, you have to use a "level adaptater", nicely lend by M. Jean-Claude Labiche, to make the intermediate between the 'control shutter' output of the camera and the 'control shutter' input of the 'shutter control command'.

 

Documentation last updated by Elodie Boller: 09/02/99