The following script, psacq.pl, takes some frames with the Photonic Science Camera and uses a counter to measure the flux. The script can be called from the Online command line by issuing, e.g.:
psacq 0.1 20
The symbol psacq has to be defined in /online_dir/exp_ini.exp:
psacq = "run [~.prog]psacq.pl"
Here is the script:
#!/bin/env perl
#
# Photonic Science Camera -> VC1
#
use Spectra;
my $status = 1;
my ( $sample_time, $np) = @ARGV;
if( !defined( $sample_time) ||
!defined( $np))
{
print "\n\n Usage: \n\n";
print " psacq sampleTime Np \n";
print "\n\n";
goto finish;
}
if( !defined( $Spectra::SYM{ generic_scan_name}))
{
$Spectra::SYM{ generic_scan_name} = "hasylab";
}
$status = Spectra::scan( device => "dummy",
start => 0,
stop => ($np - 1),
delta => 1,
st => $sample_time,
title => "A Photonic Science Test Scan",
profile =>
{ timer => [ qw(p03nano_t01)],
counter => [ qw( p03nano_c01 vc1 ipetra)],
flags => [ qw( write_to_disk 1
display_deadtime 1
bell_on_scan_end 1)],
});
finish:
$status;