#addtool  -pretend -definebyquery -label LAP.ThreePi.20120706 -set_dvodb LAP.20120706 -set_minidvodb_group LAP.slice06.part2.cam -set_minidvodb -set_label LAP.slice06.part2.cam -stage cam -uncensored -ra_min 90 -ra_max 120 -decl_min -35 -decl_max 20 -dbname gpc1 -simple | wc

#addtool  -pretend -definebyquery -label LAP.ThreePi.20120706 -set_dvodb LAP.20120706 -set_minidvodb_group LAP.slice06.cam -set_minidvodb -set_label LAP.slice06.cam -stage cam -uncensored -ra_min 90 -ra_max 120 -decl_min 20 -decl_max 75 -dbname gpc1 -simple | wc


$label = "LAP.ThreePi.20130717";

@segments = (0,1,2,3,4,5,6,7,8);
@segments1 = ( -35, -22,-10,2,14,26,38,50,62);
@segments2 = ( -22,-10,2,14,26,38,50,62,75);


@slices = ("00","02","04","06","08",10,12,14,16,18,20,22);
    
$slice = $slices[0];
$slice = $slices[1];
    foreach $num (@segments) {

	$dvodb = "LAP.20130717";
	$minidvodb_group = "LAP.slice$slice.$segments[$num].cam";
	$dvodb_label = "$minidvodb_group";
	$ra_min = $slice*15.0;
	$ra_max = ($slice+2)*15.0;
	$dec_min = $segments1[$num];
	$dec_max = $segments2[$num];
#	print "$dvodb $minidvodb_group $ra_min $ra_max $dec_min $dec_max\n";

	
	print "addtool -definebyquery  -label $label -set_dvodb $dvodb -set_minidvodb_group $minidvodb_group -set_minidvodb -set_label $dvodb_label -stage cam -uncensored -ra_min $ra_min -ra_max $ra_max -decl_min $dec_min -decl_max $dec_max -dbname gpc1 \n";



}
