EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging...
Transcript of EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging...
![Page 1: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/1.jpg)
EHT Imaging TutorialAndrew Chael & Katie Bouman
![Page 2: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/2.jpg)
Infinite Number of Possibilities
Measurements
Imaging with the Event Horizon Telescope
![Page 3: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/3.jpg)
Imaging MethodsSQUEEZE, BSMEM, MEMHorizon, Sparse Imaging, CHIRP, Closure-only
![Page 4: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/4.jpg)
SQUEEZE – Fabien BaronSparse Imaging Group
COMING SOON!
![Page 5: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/5.jpg)
eht-imaging Python Library
• MEMHorizon
• Sparse Imaging Ideas
• CHIRP
• Closure-only Imaging
• Time-Variable Imaging
• Scattering Mitigation
• Generate Data
• Plot Data/Results
![Page 6: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/6.jpg)
eht-imaging Python Library
• MEMHorizon
• Sparse Imaging Ideas
• CHIRP
• Closure-only Imaging
• Time-Variable Imaging
• Scattering Mitigation
• Generate Data
• Plot Data
EASILY SWAP IN AND OUT IDEAS &MERGE THE BEST OF ALL ALGORITHMS
It is a bit rough around the edges…and we need MUCH better documentation than we have now
![Page 7: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/7.jpg)
Step 0: Installing Python 2.7 and Necessary Dependencies
![Page 8: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/8.jpg)
Is Python 2.7 Installed?
Do You Want To Install It?
Is astropy, numpy, scipy, & matplotlib
Installed?GREAT!
Let’s Start Imaging
Yes Yes
Install Anaconda 2.7
No
Yes
NoFollow email
Instructions to Install them
Do you Have X
Forwarding?
NoAsk how tossh into our
Machine
Yes
![Page 9: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/9.jpg)
Step 1: Exploring the VLBI Imaging Website
![Page 10: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/10.jpg)
VLBI Imaging Websitevlbiimaging.csail.mit.edu
![Page 11: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/11.jpg)
VLBI Imaging Website
Standardized dataset of real & synthetic dataOver 5000 synthetic measurement sets:
14 Array Configurations, 96 Source Images, 4 Noise Levels
vlbiimaging.csail.mit.edu
![Page 12: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/12.jpg)
VLBI Imaging Website
Automatic Quantitative and Qualitative Evaluation
vlbiimaging.csail.mit.edu
![Page 13: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/13.jpg)
VLBI Imaging Website
Online form to easily simulate realistic data using user-specified parameters
vlbiimaging.csail.mit.edu
![Page 14: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/14.jpg)
Step 1: Generating Data on the VLBI Imaging Website
![Page 15: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/15.jpg)
Selecting/Uploading an Image
2.5 180
Sorry about this!We will fix the inconsistency very soon
![Page 16: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/16.jpg)
Selecting Target Location and Field of View
17:45:40.041 -29:00:28.118
0.00016 0.00016
![Page 17: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/17.jpg)
Selecting Telescopes
![Page 18: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/18.jpg)
Data Collection Settings
2017:95:00:00:00
12 600 100
![Page 19: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/19.jpg)
Data Collection Settings
227297 4096
60
![Page 20: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/20.jpg)
What Kinds of Noise Can We Add?
Atmospheric Phase Error
Systematic Gain Error
Thermal Noise
Frequency Measurement:
Bandwidth
SEFDs
Effect of 2-BitQuantization
Integration Time• Variation in Estimated
SEFD
• Variation in SEFD over Time due to Opacity Changes
![Page 21: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/21.jpg)
Selecting Types of Noise Added
Let’s JUST add Thermal Noise
![Page 22: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/22.jpg)
And now we generally generate our data….
But if so many people submit at the same time we will probably bog down the machine....
So for now, please download pre-computed data and later you can generate it yourself
![Page 23: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/23.jpg)
vlbiimaging.csail.mit.edu/myDataResults_6312
![Page 24: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/24.jpg)
What does the downloaded zip file provide?
Original Images in FITS and PNG
Plots to help you understand the data
Data in a number of formats
Information to Reproduce Data
![Page 25: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/25.jpg)
What are these data formats?
![Page 26: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/26.jpg)
Step 3: Loading and Inspecting Data
![Page 27: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/27.jpg)
In an ipython window:
import numpy as np
import ehtim as eh
![Page 28: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/28.jpg)
Load the observation file we generated
obs = eh.obsdata.load_uvfits('./data/sgraimage.uvfits')
Can also load custom text format, oifits, and MAPS output
![Page 29: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/29.jpg)
Look at plots! UV coverageobs.plotall('u','v', conj=True)
Shows both u,v and -u,-v
![Page 30: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/30.jpg)
Look at plots: Visibility amplitudesobs.plotall('uvdist’, ‘amp’)
Other possible fields include “snr”, “sigma”, “qamp”, ”uamp”,” vamp” , “m”
![Page 31: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/31.jpg)
Look at plots: Baseline phase over timeobs.plot_bl('SMA','ALMA', 'phase')
![Page 32: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/32.jpg)
Look at plots: Closure phase over timeobs.plot_cphase('LMT', 'SPT', 'ALMA')
![Page 33: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/33.jpg)
Take a look at the dirty beam and clean beamnpix = 128fov = 200*vb.RADPERUAS
dbeam = obs.dirtybeam(npix, fov)dbeam.display()
cbeam = obs.cleanbeam(npix,fov)cbeam.display()
FT of the sparse u-v coverage
Gaussian fit to the beam componentClean Beam
Dirty Beam
Image Parameters
![Page 34: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/34.jpg)
Take a look at the dirty imagedim = obs.dirtyimage(npix, fov)dim.display()
Sky Image convolved with Dirty Beam
![Page 35: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/35.jpg)
What is the array resolution?
beamparams = obs.fit_beam()
res = obs.res()
1/longest baseline – can use in circular restoring beam
(FWHM_max, FWHM_min, Position angle)
Save for use in restoring beam convolution
Clean Beam Gaussian parameters
“Maximum” resolution
![Page 36: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/36.jpg)
Step 4: Produce an Image
![Page 37: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/37.jpg)
Generate a prior image
npix = 128fov = 200*vb.RADPERUAS
zbl = 2.5prior_fwhm = 100*vb.RADPERUAS gaussparams = (prior_fwhm, prior_fwhm, 0.0)
emptyprior = eh.image.make_square(obs, npix, fov)gaussprior = emptyprior.add_gauss(zbl, gaussparams)gaussprior.display()
The zero baseline fluxFWHM of our circular Gaussian Prior
Gaussian Prior
Image Parameters
![Page 38: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/38.jpg)
Use MEM with complex visibilitiesout = eh.imager_func(obs, gaussprior, gaussprior, zbl, d1=”vis”, alpha_d1=50, s1="gs",maxit=100)
Initial Image Prior Image
Data Term & Weight
Regularizer Typeother options: “tv”, “l1”,...
# of iterations
Total flux constraint
![Page 39: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/39.jpg)
Blur and restartoutblur = out.blur_gauss(beamparams, 0.5)
out = outblurout = eh.imager_func(obs, out, out,zbl, d1=”vis”, alpha_d1=10 ,s1="gs", maxit=150)
Fractional beam size
We decreased data weight to prevent overfitting
![Page 40: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/40.jpg)
Final images – save to file
outblur = out.blur_gauss(beamparams, 0.5)
out.display()outblur.display()
imageout.save_fits('./sgraim.fits')outblur.save_fits('./sgraim_blur.fits')
Final “restored” image
Display results
Save to FITS
![Page 41: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/41.jpg)
Look at fit to data - Amplitudeseh.plotting.comp_plots.plotall_obs_im_compare(obs, out, "uvdist", "amp")
comp_plots.py has functions to overplot data from different observations
![Page 42: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/42.jpg)
Look at fit to data - Phaseseh.plotting.comp_plots.plotall_obs_im_compare(obs, out, "uvdist", "phase")
![Page 43: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/43.jpg)
Step 5: Generating Data with Atmospheric Noise
![Page 44: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/44.jpg)
Selecting/Uploading an Image
1.0 180
![Page 45: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/45.jpg)
Selecting Target Location and Field of View
12:30:49.423382
12:23:28.04366
0.00016 0.00016
![Page 46: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/46.jpg)
Selecting Telescopes
![Page 47: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/47.jpg)
Data Collection Settings
2017:95:00:00:00
12 600 100
![Page 48: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/48.jpg)
Data Collection Settings
227297 4096
60
![Page 49: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/49.jpg)
Selecting Types of Noise Added
Let’s add Thermal & Atmospheric Noise
![Page 50: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/50.jpg)
vlbiimaging.csail.mit.edu/myDataResults_3593
![Page 51: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/51.jpg)
Step 7: Image with Closure Phase
![Page 52: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/52.jpg)
Look at the phase errors
obs = eh.obsdata.load_uvfits('./data/m87image.uvfits')
obs.plotall('uvdist','phase')
npix = 128fov = 150*vb.RADPERUASdim = obs.dirtyimage(npix, fov)dim.display()
No phase = No dirty image!(Can’t CLEAN without Self-Cal)
Dirty Image
Baseline Phases
Load the data
![Page 53: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/53.jpg)
Closure Phase is preservedobs.plot_cphase(‘SMA', 'SMT', 'ALMA')
![Page 54: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/54.jpg)
Array resolution and prior image
beamparams = obs.fit_beam()res = obs.res()
npix = 128fov = 150*vb.RADPERUASzbl = 1.0prior_fwhm = 100*vb.RADPERUAS gaussparams = (prior_fwhm, prior_fwhm, 0.0)
emptyprior = eh.image.make_square(obs, npix, fov)gaussprior = emptyprior.add_gauss(zbl, gaussparams)
The zero baseline fluxFWHM of our circular Gaussian Prior
Prior Parameters
Array Resolution
Create the Gaussian Prior
![Page 55: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/55.jpg)
Image with amplitude and closure phaseout = eh.imager_func(obs, gaussprior, gaussprior, zbl,d1=”amp”,d2=”cphase”, alpha_d1=100, alpha_d2=50, s1="gs", maxit=100)
From experience, closure phase fits faster so we decrease its weight
![Page 56: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/56.jpg)
Blur and re-imageoutblur = out.blur_gauss(beamparams, 0.5)out=outblurout = eh.imager_func.maxen_amp_cphase(obs, out, out, zbl, d1=”amp”, d2=”cphase”, alpha_d1=50, alpha_d2=25, maxit=150, s1="tv”)
![Page 57: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/57.jpg)
Final images
outblur = out.blur_gauss(beamparams, 0.5)
out.display()outblur.display()
imageout.save_fits('./M87im.fits')outblur.save_fits('./M87im_blur.fits')
Final “restored” image
Display results
Save to FITS
![Page 58: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/58.jpg)
Look at fit to data - Amplitudeseh.plotting.comp_plots.plotall_obs_im_compare(obs, out, "uvdist", "amp")
![Page 59: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/59.jpg)
Look at fit to data – Closure Phaseeh.plottling.comp_plots.plot_cphase_obs_im_compare(obs, out, "ALMA","SMA","LMT")
![Page 60: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/60.jpg)
Step 7: Participate in the Imaging Challenge!
![Page 61: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/61.jpg)
vlbiimaging.csail.mit.edu/imagingchallenge• Blind data that you
download (in uvfits, oifits, and text files)
• Sample data with truth images to help verify your algorithms are working
• Code to help you get started
Deadline: December 9th , 2016New challenge out now!
![Page 62: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/62.jpg)
Advanced Topics
![Page 63: EHT Imaging Tutorial - Andrew Chael · eht-imaging Python Library • MEMHorizon • Sparse Imaging Ideas • CHIRP • Closure-only Imaging • Time-Variable Imaging • Scattering](https://reader034.fdocuments.us/reader034/viewer/2022052320/607fe24c7bede13c43451f17/html5/thumbnails/63.jpg)
Other types of imaging implemented in eht-imaging
• CHIRP• Closure-only (Closure Amplitudes + Closure Phases)• Stochastic Optics (Scattering Mitigation)• Polarimetric (using phase-robust ratios)• Dynamic Imaging (Movie Reconstruction)• Add your own!