#!/usr/bin/perl -w # Some DRAO programs mistakenly require(d?) Q or U instead of Qsst or Usst. # This is a hack to get around that. use DRAORed; my $use = q { Use: unqusstize file stokes where ironically but convieniently stokes should be either q or u, even though it means Qsst or Usst. }; if($#ARGV == 1) { $filn = $ARGV[0]; $stokes = $ARGV[1]; } else { die $use; } @retvals = fileindex($filn); $filind = $retvals[0]; open(MADR, "|madr"); print MADR "def f$filind\n"; print MADR "\n"; # File name print MADR "\n"; # Data type (IRD) [R]: print MADR "\n"; # Dimensions: print MADR "\n"; # Subset [NONE]: print MADR "\n"; # Are "undefined" data allowed? [N]: print MADR "\n"; # Data-unit type [1]: print MADR "\n"; # Scaling factor [10.000 E-4]: print MADR "\n"; # Are the parameters that print MADR "\n"; # Define coordinates print MADR "\n"; # Type of file (RD,RV,VD,UV,XY) [RD] print MADR "\n"; # Sky projection (SEGTVACF) [S]: print MADR "\n"; # Epoch for projection (1950 or 2000) [2000]: print MADR "\n"; # Select velocity-like coordinate print MADR "\n"; # RA of reference element print MADR "\n"; # DEC of reference record print MADR "\n"; # Reference ELEMENT for RA [513.000]: print MADR "\n"; # Reference RECORD for DEC [513.000]: print MADR "\n"; # DELTA "RA" per element [0' 20.000"]: print MADR "\n"; # DELTA "DEC" per record [0' 20.000"]: print MADR "\n"; # Define file (3rd dimension) coordinate? [N]: print MADR "\n"; # Define resolution (beam and velocity) print MADR "\n"; # Major width [1' 12.84"]: print MADR "\n"; # Minor width [1' 12.84"]: print MADR "\n"; # Orientation angle [-91.541D]: print MADR "\n"; # Frequency (MHz) resolution [0.000]: print MADR "\n"; # Define auxiliary astronomical parameters?[Y]: print MADR "\n"; # Central heliocentric frequency (MHz) print MADR "\u${stokes}\n"; # Stokes parameter [Usst] ("/?" = help): print MADR "\n"; # Data-set bandwidth (MHz) [7.500]: print MADR "\n"; # Observation epoch (e.g. 1984.6) print MADR "\n"; # Are the entered astrophysical parameters print MADR "\n"; # Do you want a comment? [N]: print MADR "exit\n"; close(MADR) or die "qusstize: error setting $filn ($filind) to \u${stokes}sst";