Index: trunk/ippScripts/scripts/publish_file.pl
===================================================================
--- trunk/ippScripts/scripts/publish_file.pl	(revision 25256)
+++ trunk/ippScripts/scripts/publish_file.pl	(revision 25927)
@@ -32,4 +32,5 @@
 my $difftool = can_run('difftool') or (warn "Can't find difftool" and $missing_tools = 1);
 my $ppMops = can_run('ppMops') or (warn "Can't find ppMops" and $missing_tools = 1);
+my $ppMonet = can_run('ppMonet') or (warn "Can't find ppMonet" and $missing_tools = 1);
 my $dsreg = can_run('dsreg') or (warn "Can't find dsreg" and $missing_tools = 1);
 if ($missing_tools) {
@@ -100,7 +101,39 @@
     my $file = $ipprc->filename( "PSASTRO.OUTPUT", $path_base );
     $file = $ipprc->file_resolve($file);
+    my $exp_name = $comp->{exp_name};
+    my $exp_id = $comp->{exp_id};
+    my $chip_id = $comp->{chip_id};
     my $cam_id = $comp->{cam_id};
+    my $zp = $comp->{zpt_obs};
+    my $zp_err = $comp->{zpt_stdev};
+    my $astrom = sqrt($comp->{sigma_ra}**2 + $comp->{sigma_dec}**2);
     my $name = "cam_$cam_id";
+
+    if ($product eq "MONET") {
+        my $output = $ipprc->file_resolve( "$outroot.csv.gz", 'create' ) or
+            &my_die( "Unable to resolve output file", $pub_id, $PS_EXIT_SYS_ERROR);
+
+        my $command = "$ppMonet $file $output";
+        $command .= " -exp_name " . $exp_name if defined $exp_name;
+        $command .= " -exp_id " . $exp_id if defined $exp_id;
+        $command .= " -chip_id " . $chip_id if defined $chip_id;
+        $command .= " -cam_id " . $cam_id if defined $cam_id;
+        $command .= " -zp " . $zp if defined $zp;
+        $command .= " -zp_error " . $zp_err if defined $zp_err;
+        $command .= " -astrom_rms " . $astrom if defined $astrom;
+
+        unless ($no_op) {
+            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+                run(command => $command, verbose => $verbose);
+            &my_die( "Unable to translate", $pub_id, $PS_EXIT_SYS_ERROR) unless $success;
+            &my_die( "Unable to find translated file $output", $pub_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists( $output );
+        } else {
+            print "Not running: $command\n";
+        }
+
+        $file = $output;
+    }
     print $dsFile "$file|||$product|$name|\n";
+
 } elsif ($stage eq 'diff') {
     my $command =  "difftool -diffskyfile -diff_id $stage_id";
