Index: /trunk/find_suffix_types.sh
===================================================================
--- /trunk/find_suffix_types.sh	(revision 205)
+++ /trunk/find_suffix_types.sh	(revision 205)
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+echo "DFB data suffixes:"
+find $DFB1 $DFB2 -name "*.*b" -printf "%f\n" | awk '{gsub("[0-9_:-]+","*"); print $1}' | sort | uniq
+find $DFB1 $DFB2 -name "*.?r" -printf "%f\n" | awk '{gsub("[0-9_:-]+","*"); print $1}' | sort | uniq
+find $DFB1 $DFB2 -name "*.?f" -printf "%f\n" | awk '{gsub("[0-9_:-]+","*"); print $1}' | sort | uniq
+echo " "
+echo "WBC data suffixes:"
+find $WBC $WBC2 -name "*.*b" -printf "%f\n" | awk '{gsub("[0-9_:-]+","*"); print $1}' | sort | uniq
+find $WBC $WBC2 -name "*.?r" -printf "%f\n" | awk '{gsub("[0-9_:-]+","*"); print $1}' | sort | uniq
+find $WBC $WBC2 -name "*.?f" -printf "%f\n" | awk '{gsub("[0-9_:-]+","*"); print $1}' | sort | uniq
+echo " "
+echo "CPSR data suffixes:"
+find $CP1 $CP2 -name "*.*b" -printf "%f\n" | awk '{gsub("[0-9_:-]+","*"); print $1}' | sort | uniq
+find $CP1 $CP2 -name "*.?r" -printf "%f\n" | awk '{gsub("[0-9_:-]+","*"); print $1}' | sort | uniq
+find $CP1 $CP2 -name "*.?f" -printf "%f\n" | awk '{gsub("[0-9_:-]+","*"); print $1}' | sort | uniq
+echo " "
Index: /trunk/htdocs/perl/find_archives.pl
===================================================================
--- /trunk/htdocs/perl/find_archives.pl	(revision 204)
+++ /trunk/htdocs/perl/find_archives.pl	(revision 205)
@@ -216,5 +216,6 @@
 	if (-d and /^[a-zA-Z]{0,1}[0-9]{4}[+-][0-9]{4}.*/s ) {
 
-		#print "In directory $_\n";
+		print "\n\nIn directory $_\n\n";
+		print "\$File::Find::name = $File::Find::name\n";
 		
 		foreach $ext (split (/\s+/, $archive_extensions) ) {
@@ -226,5 +227,5 @@
 		if (scalar(@all_files) == 0) {
 		
-			#print "This is a CPSR2 directory: $_\n";
+			print "This is a CPSR2 directory: $_\n";
 			
 			# Foreach observation
@@ -232,5 +233,5 @@
 			
 			foreach $cpsr2_obs_dir (@cpsr2_obs_dirs) {
-				#print "dir is $cpsr2_obs_dir\n";
+				print "dir is $cpsr2_obs_dir\n";
 				
 				# Need to check if this entry already exists
@@ -317,5 +318,5 @@
 
 			#	$vap_cmd = "ssh $machine $vap -n -c \\\"$params\\\" $file |";
-				$vap_cmd = "$vap -n -c \"$params\" $file |";
+				$vap_cmd = "$vap -n -c \"$params\" $file  | grep -v filename | grep -v -x \"\" |";
 
 				print "Calling vap...$vap_cmd\n";
@@ -328,14 +329,12 @@
 
 					# +1 because first column is filename
-					if (@result_params[0] ne "filename" && scalar(@result_params)!=0){
-					    if (scalar(@result_params) == ($num_vap_params + 1)) {
-						print "@result_params\n";
-						
-						populate_observations($File::Find::name);
-					    }
-					    else {
-						print "Incorrect number of cols = ".scalar(@result_params).". Expected " . $num_vap_params+1 ."\n";
-						print "@result_params\n";
-					    }
+					if (scalar(@result_params) == ($num_vap_params + 1)) {
+					    print "@result_params\n";
+					    
+					    populate_observations($File::Find::name);
+					}
+					else {
+					    print "Incorrect number of cols = ".scalar(@result_params).". Expected " . $num_vap_params+1 ."\n";
+					    print "@result_params\n";
 					}
 				    }
@@ -437,5 +436,5 @@
 	
 	my $display_filename = $filename;
-
+	print "display_filename = $display_filename\n";
 	my $ls = `ls -l $data_loc/$filename`;
 	
@@ -456,5 +455,5 @@
 		$data_type = $FB;
 	}
-	elsif ($filename =~ /\.rf/ || $filename =~ /fb/) {
+	elsif ($filename =~ /\.rf/ || $filename =~ /\.cf/ || $filename =~ /fb/) {
 		if ($filename =~ /^a/) { # DFB file
 			$data_type = $DFB;
@@ -485,4 +484,5 @@
 		}
 	}
+	print "display_filename = $display_filename\n";
 	
 	# Check that N/A values are set to NULL
@@ -549,10 +549,16 @@
 	print "rajd = $rajd, decjd=$decjd, gl=$gl, gb=$gb\n";
 
-	if($result_params[$params_BMAJ] eq "UNDEF"){ 
-	    $bmaj = (1.2*(299792458./($result_params[$params_FREQ] *1.e6))/64.) / $pion180; }
-	if($result_params[$params_BMAJ] eq "UNDEF"){ 
-	    $bmin = (1.2*(299792458./($result_params[$params_FREQ] *1.e6))/64.) / $pion180; }
-	if($result_params[$params_BMAJ] eq "UNDEF"){ 
-	    $bpa = 0.; 	}
+
+	# Beam information
+	$bmaj = $result_params[$params_BMAJ];
+	$bmin = $result_params[$params_BMIN];
+	$bpa = $result_params[$params_BPA];
+	if($bmaj eq "UNDEF" || $bmaj eq "*" || $bmaj == 0.){
+	    # could not get beam info from vap output. 
+	    # Need to calculate manually.
+	    $bmaj = (1.2*(299792458./($result_params[$params_FREQ] * 1.e6))/64.) / $pion180;
+	    $bmin = (1.2*(299792458./($result_params[$params_FREQ] * 1.e6))/64.) / $pion180;
+	    $bpa = 0.;
+	}
 
 	# Dud things that aren't required for this set of data.
@@ -568,4 +574,5 @@
 	}
 	
+	# print out the list of parameters 
 	print "filename = $display_filename\n";
 	print "src_name = " . $result_params[$params_NAME] . "\n";
