5 months ago
Merged.
| np | file | annotate | diff | revisions |
1.1 --- a/np Fri Feb 19 15:44:31 2010 -0500 1.2 +++ b/np Fri Feb 19 15:51:34 2010 -0500 1.3 @@ -58,6 +58,7 @@ 1.4 ################# Output format ################# 1.5 $horizontalSpacing = 1; 1.6 $verticalSpacing = 0; 1.7 +$clear = `clear`; 1.8 1.9 # To switch format, uncomment one of the @format arrays. 1.10 1.11 @@ -114,6 +115,7 @@ 1.12 &readParameters($parameterFile); 1.13 $parameters{"CosmologyHubbleConstantNow"} *= 100; 1.14 $TimeUnits = &ComputeTimeUnits(); 1.15 +&FixCosmologyLimits(); 1.16 $codeUnitsToYears = $TimeUnits / 31556926; 1.17 $processLevel = -1; 1.18 $processStatus = ' '; 1.19 @@ -187,7 +189,7 @@ 1.20 } 1.21 1.22 sub screenOutput { 1.23 - system("clear"); 1.24 + print $clear; 1.25 1.26 &updateHeaderSection(); 1.27 print join "\n", @headerSection; 1.28 @@ -513,6 +515,17 @@ 1.29 } 1.30 } 1.31 1.32 +sub FixCosmologyLimits { 1.33 + # Make initial/final time consistent with initial/final redshift. 1.34 + 1.35 + unless ($parameters{"ComovingCoordinates"}) { 1.36 + return; 1.37 + } 1.38 + 1.39 + $parameters{"InitialTime"} = &ComputeTimeFromRedshift($parameters{"CosmologyInitialRedshift"}) / $TimeUnits; 1.40 + $parameters{"StopTime"} = &ComputeTimeFromRedshift($parameters{"CosmologyFinalRedshift"}) / $TimeUnits; 1.41 +} 1.42 + 1.43 sub ComputeRedshiftFromTime { 1.44 my ($time) = @_; 1.45