Index: /branches/eam_branches/20091201/ippScripts/scripts/ds9_cmf_regions.pl
===================================================================
--- /branches/eam_branches/20091201/ippScripts/scripts/ds9_cmf_regions.pl	(revision 26658)
+++ /branches/eam_branches/20091201/ippScripts/scripts/ds9_cmf_regions.pl	(revision 26659)
@@ -81,5 +81,5 @@
 if ($mag_radius) {
     foreach my $m (@$mag) {
-        next unless defined $m and $m < "inf" and $m > "-inf";
+        next unless defined $m and $m != "nan" and $m < "inf" and $m > "-inf";
         unless (defined $mag_min and defined $mag_max) {
             $mag_min = $m;
@@ -107,5 +107,5 @@
     }
     my $r = $radius;            # Radius of circle
-    next if defined $mag_radius and (not defined $$mag[$i] or $$mag[$i] == "inf" or $$mag[$i] == "-inf");
+    next if defined $mag_radius and (not defined $$mag[$i] or $$mag[$i] eq "nan" or $$mag[$i] == "inf" or $$mag[$i] == "-inf");
     $r -= ($$mag[$i] - $mag_min) * $radius_scale if defined $mag_radius;
     print $coordFile "image; circle(" . ($$x[$i] + 1) . ',' . ($$y[$i] + 1) . ",$r) \# color = $col\n";
