$Id: practice_manual.txt,v 1.3 2007-01-09 12:26:57 michel Exp $ Practice memo This document complements the informations given to the students for the practice. See file "yoga/practice/PRACTICE_DIRECTIVES" to read the text given to the students. This file is located in a separate directory because it is not supposed to be read by the students before the practice. The objectives of this document are: - To give the set of the commands which allow the students to fit the data. - To give step by step comments on what we can observe and deduce from the observations. - To give the solutions of the questions asked to the students. ========================================================================== Obj1 ========================================================================== Data from beauty contest 2004. - http://olbin.jpl.nasa.gov/iau/2004/beauty.html - available locally in yoga/data/BeautyContest/2004-beauty_contest.html - << Can be modeled by a binary with sep. rho=21.2 mas and pa=341.6 deg, flux ratio 5.75, component diameters of 0.6 mas. >> So yoga's parameters for the simulation are: i1 = 0.85185185185185 [ = 1./(1. + 1/5.75) ] i2 = 0.14814814814815 [ = 1./(1. + 5.75) ] x = -6.69176 mas y = 20.1162 mas [with rho_PA_to_xy(21.2,341.6) ] r1 = 0.3 mas r2 = 0.3 mas How to fit ? First step, with a model of an uniform disk. > lp_practice > world = load_model(LIT_MODELS+"Obj1_uniform_disk.i"); > show_parameters, world; > go_fit, world; Number of iterations 40 (Max Number of iterations 200) Final values for fitted parameters and standard deviation: i = 1 +/- 0.0638877 r = 0.69923 +/- 0.00124607 x = 13.2999 +/- 1.76058e+07 y = -10.8153 +/- 1.69925e+07 First Chi2 = 214844 - Last Chi2 = 65879.6 Reduced first Chi2 = 891.468 - Reduced last Chi2 = 273.359 Number of degrees of freedom = 241 Confidence Level = 0 --- Covariance matrix --- i r x y i 0.0041 -1.4e-13 0.00016 0.00028 r -1.4e-13 1.6e-06 -1.5e+02 -5.5e+02 x 0.00016 -1.5e+02 3.1e+14 1.6e+14 y 0.00028 -5.5e+02 1.6e+14 2.9e+14 --- Correlation matrix --- i r x y i 1 -1.7e-09 1.4e-10 2.6e-10 r -1.7e-09 1 -0.0068 -0.026 x 1.4e-10 -0.0068 1 0.55 y 2.6e-10 -0.026 0.55 1 ========== COMMENTS ============ - sigma on x and y is huge. This means the data cannot constrain the position of the object. - on the other hand, total energy is not constrained by visibilities and we can see that i goes to unity when starting from 0.5. This is because we have added the constrain that total energy is unity. ========================================================================== > plot_radial, world, "VIS2", newwin=0 ========== COMMENTS ============ - The plot show that it cannot be a uniform disk ========================================================================== > plot_radial, world, "VISamp", newwin=1 WARNING: Not found any data with type "visamp" ========== COMMENTS ============ - This confirms that we have no VIS data. This was already shown by command load_model. But in a modeling file (here "Obj1_uniform_disk.i"), we can ask to reject any type of data (VIS2, VIS, T3, etc.) found in the data file. Here, everything is kept. ========================================================================== > plot_radial, world, "T3amp", newwin=1 > plot_radial, world, "T3phi", newwin=1 ========== COMMENTS ============ - T3 is insensitive to central coordinates and T3phi is zero for symmetric object. T3phi shows that the object is not symmetric, independantly to its positioning on the sky. - It could be binary. ========================================================================== > world = load_model(LIT_MODELS+"Obj1_binary_punct.i"); > show_parameters, world; > set_parameter, world, "x1", "y1", fixed=1 ========== COMMENTS ============ - It is better to fix the position of one component instead of keeping degenerated parameters during the fit. ========================================================================== > go_fit, world; Number of iterations 120 (Max Number of iterations 200) Final values for fitted parameters and standard deviation: i1 = 0.847126 +/- 0.0541248 i2 = 0.152842 +/- 0.00977747 x2 = -1.9557 +/- 0.00442699 y2 = 0.987198 +/- 0.005968 First Chi2 = 214782 - Last Chi2 = 55692.7 Reduced first Chi2 = 891.213 - Reduced last Chi2 = 231.09 Number of degrees of freedom = 241 Confidence Level = 0 --- Covariance matrix --- i1 i2 x2 y2 i1 0.0029 0.00053 -6.3e-07 4.8e-07 i2 0.00053 9.6e-05 6.3e-07 -4.8e-07 x2 -6.3e-07 6.3e-07 2e-05 -1.4e-05 y2 4.8e-07 -4.8e-07 -1.4e-05 3.6e-05 --- Correlation matrix --- i1 i2 x2 y2 i1 1 1 -0.0026 0.0015 i2 1 1 0.014 -0.0083 x2 -0.0026 0.014 1 -0.53 y2 0.0015 -0.0083 -0.53 1 > plot_radial, world, "VIS2", newwin=0 ========== COMMENTS ============ - Full correlation between i1 and i2: Covariance to correlation: 0.00053/sqrt(0.0029*9.6e-05)=1.0045 o This is expected, since the sum of energy of the 2 components is constrained to unity. - VIS2: o VIS2 is better. Model seems to be more appropriate since it allows some dispersion in the visibilities. This was not possible with the preceding one. o Does not fit well at low frequency. This means that at low frequency, data and models are quite different. We started the fit from separation 0 (where low frequencies are high). Perhaps, the separation is not large enough. We could be in a local minimum. o In the model, we can see too much power at high frequency since some visibilities are very close to one where data are lower. This could tell us that we need to lower the contrast of the fringes in the uv map (model is a binary). o But first, let us look at the local minimum problem. ========================================================================== > L=26.5 > sniffer_map,world,xmin=-L,xmax=L,ymin=-L,ymax=L,pixscale=1,newwin=1 > L=26.5; NL=int(2*L+1); > lpf_chi2_map_orig, world,, L, L, n_interv=NL, windownb=2, quiet=1 > window,5; pli, world.palpeur.chi2, 27, -27, -27, 27 > lpf_chi2_map, world,, L, L, n_interv=NL, windownb=3, quiet=1 ========== COMMENTS ============ - WARNING : At Goutelas 2006, the proposed tool, "chi2_map", was buggy (see below). It is now replaced by sniffer_map. - The main idea is this one: We use a binary star as a model (two dirac functions). The first component is fixed at the origin (0,0) and the second at fixed coordinates (x,y). A fit is done only on relative intensities and gives i1, i2 (with i1+i2=1) and chi2. This operation is repeated for all the possible positions (x,y) in a map. o This is slightly better than to map chi2 values (x, y moving) for fixed parameters i1 and i2. Here, i1 and i2 are fitted. o The smaller chi2 in the map gives the better place where to put the secondary component. - The command available during the Goutelas 2006 practice was "chi2_map". There was 2 critical bugs in this function. o The map was swapped along x axis. So the reading of x coordinate was wrong. o The x,y coordinates were actually not fixed during the fit. So a starting point close to a local minimum ended with the same chi2 as the one at the local minimum. o sniffer_map has since been made available for correcting these bugs. - The sampling is chosen here so that it is exactly the same with chi2_map and with sniffer_map (for the matter of comparison). - We have done 3 plots here. o Using sniffer_map - We have many minima on the map and also structures. - We get a minimum close to coordinates (-6.5, 20). So it is the initial guess we should use for starting the fit. - The minimum is quite narrow. So it is quite difficult to found without this mean. o Using chi2_map_orig (original version of chi2_map) - Function is quite longer to execute. This is because 4 parameters are (wrongly) fitted : x, y, i1, i2, instead of only i1 and i2. - Because of the bug, we have flat area of chi2 values (like stairs) : in these areas, we return to the value of the local minimum. This shows the extension of the local minima. - Furthermore, the map is swapped. The minimum is read at (-8, -21). o Using chi2_map (original where only x and y has been fixed. The other bugs are uncorrected). - We have no more a flat areas but the same look as sniffer_map. - Minimum is at (-7, -20). Since the map is swapped along x axis, we should read the minimum at (7, -20). But this is symmetric from sniffer_map. Why ? - Because the initial guess for i1 is i1=0 here and i1=1 for sniffer_map. This shows that we have local minima when fitting i1 and i2 since we have not the same result when changing the initial guess. - So let's start with (-6.5, 20). ========================================================================== > set_parameter, world, "x2", value=-6.5 > set_parameter, world, "y2", value=20 > go_fit, world; Number of iterations 121 (Max Number of iterations 200) Final values for fitted parameters and standard deviation: i1 = 0.833749 +/- 0.0532687 i2 = 0.166242 +/- 0.0106306 x2 = -6.68312 +/- 0.00387742 y2 = 20.0899 +/- 0.0055778 First Chi2 = 5913.26 - Last Chi2 = 2794.89 Reduced first Chi2 = 24.5364 - Reduced last Chi2 = 11.597 Number of degrees of freedom = 241 Confidence Level = 0 --- Covariance matrix --- i1 i2 x2 y2 i1 0.0028 0.00057 -6.1e-08 3.5e-07 i2 0.00057 0.00011 6e-08 -3.5e-07 x2 -6.1e-08 6e-08 1.5e-05 -1e-05 y2 3.5e-07 -3.5e-07 -1e-05 3.1e-05 --- Correlation matrix --- i1 i2 x2 y2 i1 1 1 -0.00029 0.0012 i2 1 1 0.0015 -0.006 x2 -0.00029 0.0015 1 -0.47 y2 0.0012 -0.006 -0.47 1 > plot_radial, world, "VIS2", newwin=0 ========== COMMENTS ============ - not bad. Still too much power at high frequency. We need a "weighting envelope" in the uv map. This can be done by a convolution in the image plane. Diracs must be enlarged. - Let's use uniform disks instead of Dirac functions. ========================================================================== > world = load_model(LIT_MODELS+"Obj1_binary_disk.i"); > show_parameters, world; > set_parameter, world, "x1", "y1", fixed=1 > set_parameter, world, "x2", value=-6.7 > set_parameter, world, "y2", value=20. > go_fit, world; Number of iterations 127 (Max Number of iterations 200) Final values for fitted parameters and standard deviation: i1 = 0.853174 +/- 0.0545116 i2 = 0.146826 +/- 0.00940555 x2 = -6.7288 +/- 0.00487463 y2 = 20.1346 +/- 0.00673876 r1 = 0.304875 +/- 0.00320673 r2 = 0.291734 +/- 0.023648 First Chi2 = 256662 - Last Chi2 = 180.775 Reduced first Chi2 = 1073.9 - Reduced last Chi2 = 0.756382 Number of degrees of freedom = 239 Confidence Level = 1 --- Covariance matrix --- i1 i2 x2 y2 r1 r2 i1 0.003 0.00051 -5.4e-07 9.1e-07 1.4e-06 -7e-06 i2 0.00051 8.8e-05 5.4e-07 -9.1e-07 -1.4e-06 7e-06 x2 -5.4e-07 5.4e-07 2.4e-05 -1.5e-05 -3.2e-06 4.7e-06 y2 9.1e-07 -9.1e-07 -1.5e-05 4.5e-05 2.8e-06 -6.5e-06 r1 1.4e-06 -1.4e-06 -3.2e-06 2.8e-06 1e-05 -8.9e-06 r2 -7e-06 7e-06 4.7e-06 -6.5e-06 -8.9e-06 0.00056 --- Correlation matrix --- i1 i2 x2 y2 r1 r2 i1 1 1 -0.002 0.0025 0.0081 -0.0054 i2 1 1 0.012 -0.014 -0.047 0.031 x2 -0.002 0.012 1 -0.45 -0.21 0.041 y2 0.0025 -0.014 -0.45 1 0.13 -0.041 r1 0.0081 -0.047 -0.21 0.13 1 -0.12 r2 -0.0054 0.031 0.041 -0.041 -0.12 1 > plot_image, world, xmin=-25, xmax=25, ymin=-25, ymax=25, pixscale=0.3 > palette, "stern.gp" ========== COMMENTS ============ - reduced Chi2 is 0.76. This is quite good. Perhaps too much perfect. This could explain by simulated data. - We can play with the symmetric coordinates. If the initial guess for coordinates is (6.7, -20.), we should swap i1 and i2. This is not the case because of a local minimum. - Other origin (the brightest at the center). ========================================================================== > set_parameter, world, "x2", value=6.7, fixed=1 > set_parameter, world, "y2", value=-20, fixed=1 > go_fit, world; Number of iterations 19 (Max Number of iterations 200) Final values for fitted parameters and standard deviation: i1 = 0.875231 +/- 0.0559236 i2 = 0.124715 +/- 0.00799702 r1 = 0.389941 +/- 0.00250694 r2 = 0.796477 +/- 0.0142536 First Chi2 = 24980.4 - Last Chi2 = 21908 Reduced first Chi2 = 103.653 - Reduced last Chi2 = 90.9045 Number of degrees of freedom = 241 Confidence Level = 0 --- Covariance matrix --- i1 i2 r1 r2 i1 0.0031 0.00045 1e-06 -3.2e-06 i2 0.00045 6.4e-05 -1e-06 3.2e-06 r1 1e-06 -1e-06 6.3e-06 1.7e-06 r2 -3.2e-06 3.2e-06 1.7e-06 0.0002 --- Correlation matrix --- i1 i2 r1 r2 i1 1 1 0.0075 -0.004 i2 1 1 -0.052 0.028 r1 0.0075 -0.052 1 0.048 r2 -0.004 0.028 0.048 1 ========================================================================== - i1 and i2 are not exchanged. We have a local minimum for i1. - we can swap the intensities. ========================================================================== > set_parameter, world, "x2", value=6.7, fixed=0 > set_parameter, world, "y2", value=-20, fixed=0 > set_parameter, world, "i1", value=0.15 > set_parameter, world, "i2", value=0.85 > show_parameters, world; > go_fit, world; Number of iterations 120 (Max Number of iterations 200) Final values for fitted parameters and standard deviation: i1 = 0.146826 +/- 0.00940555 i2 = 0.853174 +/- 0.0545116 x2 = 6.7288 +/- 0.00487463 y2 = -20.1346 +/- 0.00673876 r1 = 0.291734 +/- 0.023648 r2 = 0.304875 +/- 0.00320673 First Chi2 = 63395.6 - Last Chi2 = 180.775 Reduced first Chi2 = 265.254 - Reduced last Chi2 = 0.756383 Number of degrees of freedom = 239 Confidence Level = 1 --- Covariance matrix --- i1 i2 x2 y2 r1 r2 i1 8.8e-05 0.00051 -5.4e-07 9.1e-07 7e-06 -1.4e-06 i2 0.00051 0.003 5.4e-07 -9.1e-07 -7e-06 1.4e-06 x2 -5.4e-07 5.4e-07 2.4e-05 -1.5e-05 -4.7e-06 3.2e-06 y2 9.1e-07 -9.1e-07 -1.5e-05 4.5e-05 6.5e-06 -2.8e-06 r1 7e-06 -7e-06 -4.7e-06 6.5e-06 0.00056 -8.9e-06 r2 -1.4e-06 1.4e-06 3.2e-06 -2.8e-06 -8.9e-06 1e-05 --- Correlation matrix --- i1 i2 x2 y2 r1 r2 i1 1 1 -0.012 0.014 0.031 -0.047 i2 1 1 0.002 -0.0025 -0.0054 0.0081 x2 -0.012 0.002 1 -0.45 -0.041 0.21 y2 0.014 -0.0025 -0.45 1 0.041 -0.13 r1 0.031 -0.0054 -0.041 0.041 1 -0.12 r2 -0.047 0.0081 0.21 -0.13 -0.12 1 > plot_image, world, xmin=-25, xmax=25, ymin=-25, ymax=25, pixscale=0.3 > palette, "stern.gp" > gridxy,0,0 ========================================================================== - So here components are swapped (exactly). The image map is translated. - Data are insensitive to a translation of the map. - If we remove T3phi data, the remaining data would be insensitive to a symmetry. This can be verified by editing file LIT_MODELS+"Obj1_binary_punct.i" ========================================================================== ========================================================================== Obj2 ========================================================================== Corresponds to file "GW_Ori.2003Nov.A35B15C10.oifits" from Jean-Philippe Berger. Original OI_TARGET has been overwritten by string "OBJECT". These are real data !