[PIPE2D-365] Interpolate between model templates Created: 20/Feb/19 Updated: 20/Dec/21 Resolved: 20/Dec/21 |
|
| Status: | Done |
| Project: | DRP 2-D Pipeline |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Story | Priority: | Normal |
| Reporter: | hassan | Assignee: | Takuji Yamashita |
| Resolution: | Done | Votes: | 0 |
| Labels: | flux-calibration, model-templates | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Story Points: | 4 | ||||||||||||||||||||||||||||
| Sprint: | 2DDRP-2019 E, 2DDRP-2019 F, 2DDRP-2019 G, 2DDRP-2019 H, 2DDRP-2019 I, 2DDRP-2019 J, 2DDRP-2019 K, 2DDRP-2020 A | ||||||||||||||||||||||||||||
| Reviewers: | hassan | ||||||||||||||||||||||||||||
| Description |
|
Provide a means of interpolating the AMBRE-derived model template data such that accurate model spectra for the candidate F-stars are determined. The source code for the interpolation, along with documentation, should be provided under GitHub. |
| Comments |
| Comment by Takuji Yamashita [ 11/Jul/19 ] |
|
I tried interpolations using some methods (1D, 3D Linear, 1D RBF, 3D RBF, 4D RBF) and compared the results with a reference model. The interpolations were done at a parameter point where we have a model.
1DResults of 1D interpolation in the direction of the effective temperature (Teff). The cubic spline interpolation is the best among the test cases. The accuracies are low around 400nm for all the cases. 3D LinearA result of the interpolation with 3 parameters (Teff, log(g), and metallicity). The residual is 0.4 % (standard dev) for the full wavelength. The accuracy around 400nm still remains low (1.4% at 390-400nm). 1D RBFThe radial basis function interpolation (scipy.interpolate.Rbf). Multiquadric, Inverse multiquadric, Gaussian, Thin plate reproduce the reference model well. 3D RBFRBF interpolation with 3 parameters (Teff, log(g) and metallicity) using the multiquadric kernels as a test. The standard deviation of the residual is 0.2 % for the full wavelength and 1.2% at 390-400nm. This is better than the 3D linear interpolation. 4D RBFIt is under investigation but a current RBF interpolation with 4 parameters including [alpha/Fe] is not good. |
| Comment by Takuji Yamashita [ 08/Aug/19 ] |
Step-by-step interpolationI tried a 2D interpolation in a step-by-step manner (SBS). First, a spectrum is interpolated only along Teff, and then it is interpolated along log(g). This method increases an amount of computation increase significantly, but I expected I would get a steady interpolation up to the fourth dimensions ([alpha/Fe]). 3D RBF with Teff/1000I am aware of a problem that the parameter step of Teff is remarkably larger than the others in the current RBF interpolation, although the RBFs are axisymmetric functions. As a test, I divide Teff by 1000 to roughly match its step with those of the others, and then I make an interpolation with 3D RBF (Teff, log(g), Z). The figures are flux residuals between the RBF interpolations and a reference model. The top panel is for a new RBF with the scaled-down Teff and the bottom is for the previous 3D RBF with the original Teff step. We got a better interpolation with a higher accuracy (stddev=0.015%). |
| Comment by hassan [ 19/Sep/19 ] |
|
From Takuji Yamashita: I decided to use 4D RBF interpolation. This works very well but takes much time (~100min/spectrum). Now I am trying to speed up while I am facing some technical problems. It needs more several days. I will close the ticket after finishing coding it. |
| Comment by Takuji Yamashita [ 20/Sep/19 ] |
|
I pushed codes for this tickets to Git. The codes make an interpolated spectrum with 4D RBF interpolation (`scipy.interpolate.Rbf`) and `multiprocessing` module. The process takes ~60min/spectrum in a machine I use. The bottleneck is a large number of pixels. Current models have a pixel scale of 0.01 nm. Because input templates can be smoothed with Gaussian Kernel of FWHM ~ 0.2 nm, we can use a larger pixel scale of 0.04 nm, for example. In this case, I expect the time is ~ 15min/spectrum. The evaluation of the created interpolation spectra will be done in another ticket. |
| Comment by Takuji Yamashita [ 03/Oct/19 ] |
|
Now the computing time was reduced to ~15min/spectrum using a new high-speed computer we recently purchased. I think it is reasonable. I made two small tickets of |
| Comment by rhl [ 04/Oct/19 ] |
|
Can you clarify whether this 15 min/spectrum is the time to fit the RBF to the models and interpolate to a set of parameters, or the time to interpolate to a new set of parameters once the interpolation schema is determined? In other words, how long does it take to interpolate 10 spectra if you do them all at once? |
| Comment by Takuji Yamashita [ 04/Oct/19 ] |
|
The former. The RBF is fitted at a local parameter space, and therefore if I have 10 scattered sets of parameters, it takes 15min * 10; if I have 10 clustered sets (I can use the identical RBF for them), I think the time is shorter (but I have not yet tried that). I am now trying to adjust a number of neighbor models to be used for interpolation. Processing time of the RBF fit is subject to it. |
| Comment by Takuji Yamashita [ 11/Oct/19 ] |
|
Now, the processing time including RBF fit and interpolation is ~3min/spectrum on average. I reduced a number of neighbor spectra for an interpolation from ~250 to ~100 at the small expense of accuracy. The details will be provided in |
| Comment by Takuji Yamashita [ 17/Jan/20 ] |
|
We were using 4D RBF interpolation. But I realized that we do not need 4D interpolation. We only need 2D, because we do not make small parameter steps along both metallicity and alpha elements. These original steps are small enough (the study of I changed the code from 4D to 2D (only for temperature and surface gravity). The 2D interpolation is simpler and faster (~9 sec for an interpolation at a grid point). The mass process of the 2D interpolation has been done. Now I am re-calculating the accuracies. |
| Comment by Takuji Yamashita [ 17/Jan/20 ] |
|
I will report a result of the accuracies of 2D RBF in another ticket. Should I make a new ticket for that or use the closed ticket for 4D RBF (PIPE2D-460)? |
| Comment by Takuji Yamashita [ 20/Dec/21 ] |
|
We can close this ticket to study the parameter interpolation of model templates because we have studied it and evaluated the results in PIEP2D-460. |