PFSSpy not tracing field lines

73 views
Skip to first unread message

Richard Morton

unread,
Feb 13, 2024, 11:37:11 AMFeb 13
to SunPy
Hi,

I am having an issue with PFSSpy not tracing field lines, and was hoping for some pointers.


However, I am trying to do this using a different date and HMI data. No matter what I set as the seed points, the field line tracing just returns `fields lines` with the same coordinates for each entry. No warnings given.

The tracing works when I create the seeds with a reference frame that refers to the pfss data, i.e., seeds = SkyCoord(x, y, r, frame=pfss_out.coordinate_frame).

Full code I am using is below.

Thanks,
   Richard

-----------------------------------------
# Load AIA data
file_path='/Users/richardmorton/google_drive/sdo_cor_hole_data/2010-05-23/aia_lev1_193a_2010_05_23t01_00_06_63z_image_lev1.fits'
aia = sunpy.map.Map(file_path)

# Set seed locations
hp_lon = np.linspace(-100, 100, 5) * u.arcsec
hp_lat = np.linspace(-930, -900, 5) * u.arcsec
lon, lat = np.meshgrid(hp_lon, hp_lat)
seeds = SkyCoord(lon.ravel(), lat.ravel(), frame=aia.coordinate_frame)

# Download and import HMI Carrington map
car_rot = int(carrington_rotation_number(aia.meta['date-obs']))
time = a.Time('2010/01/01', '2010/01/01')
series = a.jsoc.Series('hmi.synoptic_mr_polfil_720s')
crot = a.jsoc.PrimeKey('CAR_ROT', car_rot)result = Fido.search(time, series, crot,
                     a.jsoc.Notify('X'))
files = Fido.fetch(result)

hmi_map = sunpy.map.Map(files[0])
hmi_map = hmi_map.resample([720, 360] * u.pix)

# Calculate pfss extrapolation
nrho = 25
rss = 2.5
pfss_in = pfsspy.Input(hmi_map, nrho, rss)
pfss_out = pfsspy.pfss(pfss_in)

# Trace field lines
tracer = tracing.PythonTracer()
flines = tracer.trace(seeds, pfss_out)

Nabil Freij

unread,
Feb 15, 2024, 4:27:30 PMFeb 15
to SunPy
Hi Richard,

It's hard to say for sure what is going on and currently PFSSpy has been archived and we are actively working on creating a new version (with the original authors approval)  under the SunPy Project. 

Could you check the "r_sun" value in the AIA image and magentogram?

One potential problem is that the seed point transform from AIA to magnetogram is not behaving.
One avenue would be to try and debug the seed point coordinates to make sure they are sensible when transformed to the frame of the magnetogram. If you try manually transforming the seed points from one frame to another and see what the result is, hopefully that might shed some light on the problem.

Kind regards,
Nabil
Reply all
Reply to author
Forward
0 new messages