Numerical Solution & Performance

For a set of 50 images the code initially needed 50 min to run. By improving the interpolation it now running in 25 min. Significant improvements are still needed (solver, sampling, fitting).

Oops

It seems I was fitting ✨nonsense✨
The glob.glob() function return the images in random order - I was correlating random viewing directions to random images (same for Correlation of Intensity to tangent direction)

Current performance: 5min for 50 images

The correlation of the outputed parameters with the time and orbit can be found in Benchmarking

Problems

Depending on the image geometry several problems arise:
-- Clipping - Interpolator: When the model starts to leave outside the FOV the interpolator clips the values to the edge of the image.
Pasted image 20250423173451.png|200 Pasted image 20250423173957.png|200
-- Inside the magnetopause - Solver: as soon as we enter the magnetopause, the outputted curve displays discrepancies. In other cases random points are being returned that do not resemble a curve. This is because the solution has less than 5 point (4 needed for the cubic interpolation) and the interpolator returns None for the az , el indexes. The r0 that is return is just the first argument of the initial fitting array - in this case 6 RE.
Pasted image 20250423173731.png|200 Pasted image 20250423174637.png|200
-- Empty xml file - 3DView: in index 26, 3DView outputs an empty image
Pasted image 20250423174153.png|200

Solutions

Interpolation

Initial interpolator was too slow, mainly beacuse:

Performance: 0.06sec ==> 0.0007sec (2 orders of magnitude faster)

Sampling

In order to check

Solver

Having calculated analytically the equation that returns the Tangent points to SXI in GSE we can turn this into a numerical function using lamdify and solve numericaly for φ and θ:

F(θ,φ,a,r0)=0
First

Apply mask to values lower than an arbitrary threshold

Pasted image 20250327105233.png|300

Fitting a, r0

djhlksd