space-physics / themisasi

Read & Plot THEMIS ASI 256x256 "high resolution" GBO ground-based imager data
https://space-physics.github.io/themisasi/
MIT License
5 stars 2 forks source link

need for check on slant range in asi_projection #1

Open rmcgranaghan opened 5 years ago

rmcgranaghan commented 5 years ago

I am running into an error attempting to use 'plots.asi_projection' in which negative slant range values are being produced and the code is throwing an error because slant range should be in the range [0,infinity). Below is the code that will reproduce the error. Note that the data I am reading in lacks an 'alt_km' attribute, which is needed by 'asi_projection', so I am manually setting that attribute. I am uncertain whether it is my error that is causing negative slant ranges or if a check for these non-physical ranges is needed.


import numpy as np
import os

import themisasi as ta

time_query = '2016-11-29T12'

ta.download(time_query, 'mcgr', '~/Documents/THEMIS_data')

dat = ta.load('~/Documents/THEMIS_data/', site='mcgr', treq=time_query)

dat['alt_km'] = dat.attrs['alt_m']*1000
import themisasi.plots as tap
tap.asi_projection(dat,110e3)
scivision commented 5 years ago

The negative slant ranges are coming from pixels near the horizon, which are poorly fit to the skymap. I will make a parameter to censor these values, which are generally of little utility due to their large angular error. We have been doing this in our private analysis, but this should be the usual practice for anyone using this data.

There are newer robust calibration techniques using Astrometry.net that may allow a better calibration of these low-elevation pixels, should some future analysis need.