Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for issues detected while trying to run the steps locally. #1

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
3 changes: 3 additions & 0 deletions data_validation/scripts/unpack_data.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash
mkdir -p images
mkdir -p data
wget https://github.com/eventhorizontelescope/2019-D01-01/raw/master/EHTC_FirstM87Results_Apr2019_uvfits.tgz
wget https://github.com/eventhorizontelescope/2019-D01-01/raw/master/EHTC_FirstM87Results_Apr2019_csv.tgz
tar -xvzf EHTC_FirstM87Results_Apr2019_uvfits.tgz -C data --strip-components=1
tar -xvzf EHTC_FirstM87Results_Apr2019_csv.tgz -C data --strip-components=1
mkdir -p data/csv/converted
32 changes: 32 additions & 0 deletions src/difmap/CircMask_r30_x-0.002_y0.022.win
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
! CLEAN windows written by wwins in difmap.
! Columns specify xmin xmax ymin ymax (mas) of each CLEAN window.
-0.0319833287 0.0279833287 0.0210000000 0.0230000000
-0.0318496231 0.0278496231 0.0230000000 0.0250000000
-0.0315803989 0.0275803989 0.0250000000 0.0270000000
-0.0311719043 0.0271719043 0.0270000000 0.0290000000
-0.0306181760 0.0266181760 0.0290000000 0.0310000000
-0.0299105715 0.0259105715 0.0310000000 0.0330000000
-0.0290370117 0.0250370117 0.0330000000 0.0350000000
-0.0279807621 0.0239807621 0.0350000000 0.0370000000
-0.0267184142 0.0227184142 0.0370000000 0.0390000000
-0.0252163735 0.0212163735 0.0390000000 0.0410000000
-0.0234242853 0.0194242853 0.0410000000 0.0430000000
-0.0212613603 0.0172613603 0.0430000000 0.0450000000
-0.0185831240 0.0145831240 0.0450000000 0.0470000000
-0.0150766968 0.0110766968 0.0470000000 0.0490000000
-0.0096811457 0.0056811457 0.0490000000 0.0510000000
-0.0319833287 0.0279833287 0.0230000000 0.0210000000
-0.0318496231 0.0278496231 0.0210000000 0.0190000000
-0.0315803989 0.0275803989 0.0190000000 0.0170000000
-0.0311719043 0.0271719043 0.0170000000 0.0150000000
-0.0306181760 0.0266181760 0.0150000000 0.0130000000
-0.0299105715 0.0259105715 0.0130000000 0.0110000000
-0.0290370117 0.0250370117 0.0110000000 0.0090000000
-0.0279807621 0.0239807621 0.0090000000 0.0070000000
-0.0267184142 0.0227184142 0.0070000000 0.0050000000
-0.0252163735 0.0212163735 0.0050000000 0.0030000000
-0.0234242853 0.0194242853 0.0030000000 0.0010000000
-0.0212613603 0.0172613603 0.0010000000 -0.0010000000
-0.0185831240 0.0145831240 -0.0010000000 -0.0030000000
-0.0150766968 0.0110766968 -0.0030000000 -0.0050000000
-0.0096811457 0.0056811457 -0.0050000000 -0.0070000000
256 changes: 256 additions & 0 deletions src/difmap/afmhot_10us.cmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
0.092633 0.067057 0.061824 1
0.113669 0.062030 0.051540 1
0.140569 0.050091 0.033232 1
0.165165 0.033736 0.017454 1
0.188428 0.014065 0.005529 1
0.205142 0.000004 0.000001 1
0.211265 0.000002 0.000001 1
0.217357 0.000006 0.000002 1
0.223424 0.000007 0.000002 1
0.229468 0.000006 0.000002 1
0.235490 0.000001 0.000000 1
0.241483 0.000005 0.000002 1
0.247456 0.000007 0.000002 1
0.253410 0.000006 0.000002 1
0.259346 0.000002 0.000001 1
0.265259 0.000004 0.000001 1
0.271155 0.000007 0.000002 1
0.277036 0.000007 0.000002 1
0.282902 0.000002 0.000001 1
0.288750 0.000005 0.000001 1
0.294582 0.000007 0.000002 1
0.300004 0.000882 0.000282 1
0.304945 0.002842 0.000922 1
0.309881 0.004862 0.001598 1
0.314817 0.006939 0.002307 1
0.319751 0.009070 0.003050 1
0.324686 0.011255 0.003824 1
0.329623 0.013488 0.004629 1
0.334563 0.015767 0.005462 1
0.339508 0.018090 0.006322 1
0.344458 0.020451 0.007207 1
0.349415 0.022851 0.008117 1
0.354379 0.025285 0.009048 1
0.359352 0.027748 0.009999 1
0.364335 0.030239 0.010968 1
0.369329 0.032752 0.011953 1
0.374334 0.035286 0.012952 1
0.379352 0.037836 0.013964 1
0.384383 0.040400 0.014985 1
0.389428 0.042887 0.016014 1
0.394488 0.045292 0.017048 1
0.399565 0.047620 0.018086 1
0.404658 0.049875 0.019124 1
0.409768 0.052058 0.020162 1
0.414895 0.054174 0.021197 1
0.420042 0.056222 0.022226 1
0.425208 0.058204 0.023248 1
0.430393 0.060122 0.024259 1
0.435600 0.061976 0.025257 1
0.440827 0.063768 0.026241 1
0.446075 0.065500 0.027209 1
0.451346 0.067170 0.028158 1
0.456639 0.068780 0.029086 1
0.461954 0.070329 0.029991 1
0.467294 0.071817 0.030870 1
0.472657 0.073245 0.031721 1
0.477999 0.074767 0.032190 1
0.483310 0.076423 0.032180 1
0.488575 0.078253 0.031579 1
0.493868 0.080011 0.030948 1
0.499185 0.081709 0.030255 1
0.504533 0.083330 0.029546 1
0.509905 0.084892 0.028776 1
0.515305 0.086387 0.027966 1
0.520733 0.087815 0.027114 1
0.526186 0.089186 0.026196 1
0.531658 0.090523 0.025161 1
0.537149 0.091825 0.024017 1
0.542657 0.093097 0.022742 1
0.548182 0.094341 0.021334 1
0.553727 0.095546 0.019813 1
0.559287 0.096731 0.018140 1
0.564868 0.097876 0.016358 1
0.570467 0.098993 0.014437 1
0.576088 0.100068 0.012387 1
0.581750 0.101056 0.010171 1
0.587467 0.101921 0.007745 1
0.593246 0.102644 0.005128 1
0.598420 0.104881 0.003606 1
0.602699 0.109285 0.003830 1
0.606968 0.113646 0.004025 1
0.611229 0.117960 0.004211 1
0.615481 0.122237 0.004377 1
0.619725 0.126477 0.004528 1
0.623961 0.130683 0.004664 1
0.628190 0.134862 0.004781 1
0.632411 0.139011 0.004889 1
0.636624 0.143139 0.004972 1
0.640831 0.147240 0.005052 1
0.645030 0.151324 0.005105 1
0.649223 0.155386 0.005154 1
0.653408 0.159434 0.005180 1
0.657587 0.163463 0.005201 1
0.661759 0.167480 0.005201 1
0.665926 0.171482 0.005195 1
0.670086 0.175474 0.005171 1
0.674240 0.179454 0.005139 1
0.678388 0.183424 0.005093 1
0.682531 0.187385 0.005037 1
0.686668 0.191339 0.004970 1
0.690800 0.195285 0.004892 1
0.694926 0.199224 0.004805 1
0.699047 0.203159 0.004707 1
0.703163 0.207087 0.004603 1
0.707273 0.211012 0.004487 1
0.711380 0.214933 0.004366 1
0.715481 0.218851 0.004235 1
0.719577 0.222766 0.004100 1
0.723669 0.226679 0.003956 1
0.727757 0.230590 0.003809 1
0.731840 0.234500 0.003653 1
0.735920 0.238409 0.003496 1
0.739995 0.242319 0.003332 1
0.744066 0.246227 0.003167 1
0.748133 0.250137 0.002997 1
0.752196 0.254047 0.002828 1
0.756256 0.257959 0.002654 1
0.760312 0.261871 0.002481 1
0.764366 0.265784 0.002301 1
0.768421 0.269694 0.002110 1
0.772475 0.273603 0.001905 1
0.776530 0.277510 0.001690 1
0.780585 0.281416 0.001460 1
0.784640 0.285322 0.001221 1
0.788697 0.289227 0.000968 1
0.792753 0.293133 0.000706 1
0.796811 0.297038 0.000432 1
0.800868 0.300945 0.000148 1
0.804892 0.304893 0.000003 1
0.808882 0.308882 0.000001 1
0.812871 0.312872 0.000003 1
0.816862 0.316862 0.000001 1
0.820854 0.320854 0.000002 1
0.824847 0.324847 0.000002 1
0.828841 0.328841 0.000002 1
0.832837 0.332837 0.000002 1
0.836834 0.336835 0.000002 1
0.840834 0.340834 0.000002 1
0.844835 0.344836 0.000002 1
0.848837 0.348842 0.000012 1
0.852838 0.352854 0.000042 1
0.856837 0.356873 0.000091 1
0.860835 0.360898 0.000162 1
0.864831 0.364930 0.000255 1
0.868827 0.368969 0.000372 1
0.872822 0.373015 0.000514 1
0.876816 0.377068 0.000681 1
0.880810 0.381128 0.000876 1
0.884803 0.385196 0.001098 1
0.888795 0.389270 0.001352 1
0.892787 0.393353 0.001635 1
0.896778 0.397443 0.001952 1
0.900770 0.401542 0.002300 1
0.904761 0.405647 0.002686 1
0.908752 0.409761 0.003105 1
0.912743 0.413883 0.003565 1
0.916735 0.418014 0.004061 1
0.920727 0.422152 0.004601 1
0.924718 0.426299 0.005179 1
0.928711 0.430454 0.005806 1
0.932704 0.434618 0.006473 1
0.936698 0.438791 0.007191 1
0.940692 0.442972 0.007953 1
0.944688 0.447162 0.008769 1
0.948684 0.451362 0.009633 1
0.952682 0.455570 0.010553 1
0.956680 0.459787 0.011526 1
0.960680 0.464014 0.012556 1
0.964682 0.468250 0.013645 1
0.968685 0.472495 0.014793 1
0.972689 0.476749 0.016004 1
0.976695 0.481014 0.017278 1
0.980703 0.485287 0.018619 1
0.984713 0.489571 0.020025 1
0.988725 0.493864 0.021504 1
0.992739 0.498168 0.023050 1
0.996217 0.503024 0.021093 1
0.999068 0.508507 0.015182 1
1.000000 0.515619 0.015585 1
1.000000 0.523413 0.023380 1
1.000000 0.531144 0.031112 1
1.000000 0.538814 0.038828 1
1.000000 0.546423 0.046496 1
1.000000 0.553969 0.054033 1
1.000000 0.561455 0.061509 1
1.000000 0.568883 0.068927 1
1.000000 0.576257 0.076291 1
1.000000 0.583579 0.083603 1
1.000000 0.590852 0.090864 1
1.000000 0.598078 0.098079 1
1.000000 0.605258 0.105269 1
1.000000 0.612396 0.112414 1
1.000000 0.619494 0.119517 1
1.000000 0.626554 0.126579 1
1.000000 0.633578 0.133603 1
1.000000 0.640568 0.140590 1
1.000000 0.647525 0.147543 1
1.000000 0.654451 0.154464 1
1.000000 0.661349 0.161354 1
1.000000 0.668217 0.168220 1
1.000000 0.675057 0.175067 1
1.000000 0.681872 0.181885 1
1.000000 0.688663 0.188677 1
1.000000 0.695432 0.195445 1
1.000000 0.702180 0.202190 1
1.000000 0.708907 0.208913 1
1.000000 0.715616 0.215616 1
1.000000 0.722303 0.222309 1
1.000000 0.728974 0.228982 1
1.000000 0.735629 0.235638 1
1.000000 0.742268 0.242277 1
1.000000 0.748894 0.248900 1
1.000000 0.755506 0.255509 1
1.000000 0.762105 0.262107 1
1.000000 0.768690 0.268695 1
1.000000 0.775265 0.275271 1
1.000000 0.781830 0.281836 1
1.000000 0.788385 0.288390 1
1.000000 0.794932 0.294934 1
1.000000 0.801470 0.301471 1
1.000000 0.807999 0.308002 1
1.000000 0.814521 0.314526 1
1.000000 0.821037 0.321042 1
1.000000 0.827549 0.327552 1
1.000000 0.834055 0.334056 1
1.000000 0.840556 0.340557 1
1.000000 0.847052 0.347055 1
1.000000 0.853546 0.353549 1
1.000000 0.860036 0.360040 1
1.000000 0.866525 0.366528 1
1.000000 0.873012 0.373013 1
1.000000 0.879497 0.379499 1
1.000000 0.885981 0.385984 1
1.000000 0.892465 0.392468 1
1.000000 0.898949 0.398952 1
0.999544 0.905499 0.408416 1
0.998740 0.912075 0.420422 1
0.997994 0.918610 0.432492 1
0.997305 0.925105 0.444650 1
0.996685 0.931559 0.456866 1
0.996137 0.937970 0.469141 1
0.995668 0.944336 0.481489 1
0.995280 0.950658 0.493931 1
0.994988 0.956931 0.506436 1
0.994794 0.963156 0.519004 1
0.994703 0.969333 0.531642 1
0.994720 0.975458 0.544388 1
0.994855 0.981532 0.557202 1
0.995115 0.987553 0.570083 1
0.995508 0.993518 0.583031 1
0.998300 0.998505 0.596729 1
1.000000 1.000000 0.670757 1
0.999999 1.000000 0.766032 1
1.000000 1.000000 0.850975 1
0.999997 1.000000 0.928392 1
1.000000 1.000000 1.000000 1
40 changes: 40 additions & 0 deletions src/difmap/difmap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash
#
# Copyright (C) 2019 The Event Horizon Telescope Collaboration
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

if [ $# -eq 0 ]; then
echo "usage: $0 [input].uvfits"
exit 0
fi

in_name=${1%.uvfits}

expect <<EOF
set timeout -1

spawn difmap

expect "*0>"
send -- "@EHT_Difmap ${in_name},CircMask_r30_x-0.002_y0.022,-10,0.5,0.1,2,-1\r"

expect "*0>"
send -- "exit\r"

expect "*quit without saving: "
send -- "\r"

expect eof
EOF
6 changes: 4 additions & 2 deletions src/difmap/run-postprocessing.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#!/usr/bin/env bash

mkdir -p difmap-pdfs difmap-imgsums
cp difmap-output/*.fits .

for f in *.fits; do
for f in *.fits; do
python difmap-postprocessing.py -i $f --all
done

for d in 095 096 100 101; do
python difmap-imgsum.py \
-i SR1_M87_2017_${d}_lo_hops_netcal_StokesI.CircMask_r30_x-0.002_y0.022.RT-10.CF0.5.ALMA0.1.UVW2_-1.noresiduals.fits \
-o ../data/uvfits/SR1_M87_2017_${d}_lo_hops_netcal_StokesI.uvfits
-o ../../data_validation/data/uvfits/SR1_M87_2017_${d}_lo_hops_netcal_StokesI.uvfits
done

rm *.fits
4 changes: 3 additions & 1 deletion src/difmap/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

cp ../data/uvfits/*.uvfits .

mkdir -p difmap-output
cp ../../data_validation/data/uvfits/*.uvfits .
for f in *.uvfits; do
./difmap.sh $f
done
Expand Down
Loading