Skip to content

Commit

Permalink
Merge pull request #1115 from kettenis/x-y
Browse files Browse the repository at this point in the history
Add support for X-Y mounts
  • Loading branch information
tammojan committed Jul 27, 2021
2 parents dd05222 + ebbfd4b commit d79f9f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions ms/MSOper/MSDerivedValues.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ MSDerivedValues& MSDerivedValues::setAntennaMount(const Vector<String>& mount)
mount_p(i)=0;
} else if (mount(i)=="equatorial" || mount(i)=="EQUATORIAL") {
mount_p(i)=1;
} else if (mount(i)=="X-Y" || mount(i)=="x-y") {
mount_p(i)=2;
} else if (mount(i)=="orbiting" || mount(i)=="ORBITING") {
mount_p(i)=2;
} else if (mount(i)=="x-y" || mount(i)=="X-Y") {
mount_p(i)=3;
} else if (mount(i)=="alt-az+nasmyth-r" || mount(i)=="ALT-AZ+NASMYTH-R") {
mount_p(i)=4;
Expand Down Expand Up @@ -269,7 +269,7 @@ Double MSDerivedValues::parAngle()
Double pa=0;

if (mount_p(antenna_p)==0 || mount_p(antenna_p)==4 ||
mount_p(antenna_p)== 5) {
mount_p(antenna_p)==5) {
// Now we can do the conversions using the machines
mRADecInAzEl_p = cRADecToAzEl_p();
mHADecPoleInAzEl_p = cHADecToAzEl_p();
Expand All @@ -291,6 +291,10 @@ Double MSDerivedValues::parAngle()
//# cout<<"Antenna "<<iant<<" at time: "<<MVTime(mEpoch.getValue())<<
//# " has PA = "<<pa_p(iant)*57.28<<endl;

} else if (mount_p(antenna_p)==3) {
Double ha = cRADecToHADec_p().getValue().get()(0);
Double dec = cRADecToHADec_p().getValue().get()(1);
pa = atan2(-cos(ha), -sin(ha) * sin(dec));
} else if (mount_p(antenna_p)==1) {
// nothing to do for equatorial mounts, pa is always 0
} else {
Expand Down
4 changes: 2 additions & 2 deletions msfits/MSFits/FitsIDItoMS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2586,8 +2586,8 @@ void FITSIDItoMS1::fillAntennaTable()
switch (mntid(i)) {
case 0: mount="ALT-AZ"; break;
case 1: mount="EQUATORIAL"; break;
case 2: mount="X-Y"; break;
case 3: mount="ORBITING"; break;
case 2: mount="ORBITING"; break;
case 3: mount="X-Y"; break;
case 4: mount="ALT-AZ+NASMYTH-R"; break;
case 5: mount="ALT-AZ+NASMYTH-L"; break;
default: mount="UNKNOWN"; break;
Expand Down

0 comments on commit d79f9f8

Please sign in to comment.