Closed lacorbet closed 6 years ago
Thanks for creating the issue @lacorbet! I'll take a look.
Code below added to wrapper.py to fix Linux bug:
if np.max(np.unique(coredetectionmap.data)) > 0:
plot_detections.main(processedmap, coredetectionmap, pslmap,
data_dir, smartdate)
else:
plot_detections.nodetections(processedmap,data_dir,smartdate)
Code below added to plot_detections.py to fix Linux bug:
def nodetections(processedmap, data_dir, smartdate): figure = plt.figure()
bottom_left = SkyCoord(-1000*u.arcsec, -1000*u.arcsec,
frame=processedmap.coordinate_frame)
top_right = SkyCoord(1000*u.arcsec, 1000*u.arcsec,
frame=processedmap.coordinate_frame)
submap = processedmap.submap(bottom_left, top_right)
axes = wcsaxes_compat.gca_wcs(processedmap.wcs)
image = processedmap.plot(vmin=-500, vmax=500, axes=axes)
axes.coords.grid(False)
# Draw solar lat/lon grid
overlay = grid_overlay(axes, grid_spacing=10 * u.deg)
plt.colorbar(label='B [G]')
plt.savefig(data_dir+smartdate+'_detections.png',format='png',dpi=1000)
Ah its the plotting - makes sense! Thanks @lacorbet I'll integrate your fix into the code 👍
Great! no problem :)
When running a for loop to run through multiple fitsfiles, the following error presents:
"File "/usr/lib64/python3.6/site-packages/numpy/core/_methods.py", line 29, in _amin return umr_minimum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation minimum which has no identity"
Here is a link to the code used to run the files: https://gitlab.com/lacorbet/mysmart_project/blob/master/executeall.py
Note: These files all ran fine on my (windows) laptop; perhaps this is a linux issue?