Questions relate to 'sunpy.map', draw map contours by using 'set_levels'

Hi everyone, I am currently using ‘sunpy.map’ to analysing LOFAR tied array image. After I generated a map from a LOFAR tied array dataset, I create a composite map to overplot the LOFAR and the AIA images. The composite map is called ‘my_map’

I learned that I can use ‘my_maps.set_levels(1, [75], percent=True)’ to generate contours directly. However, I found contours are too thin and dark to see right now, and I don’t know how to change the linewidth and the colour.

Another question: if there is a way to plot the centroid of the contour?

Many thanks,
Jinge

Hi Jinge, thanks for asking here!

For customising contours, I don’t think there is an easy way, and your post has led me to a bug in sunpy that we would need to fix first: No way to specify line colors for a CompositeMap plot that includes contours · Issue #5455 · sunpy/sunpy · GitHub

I would recommend not using a composite map to do this, but instead keeping two different sunpy maps (an AIA one, and a LOFAR one). There is an example of drawing contours here: Overplotting HMI Contours on an AIA Image — SunPy 3.0.1 documentation - hopefully that does what you want, and you can customise the contours using arguments to the draw_contours call.

For plotting the centroid have you calculated the centroid already and just want to plot it, or do you need to calculate the centroid too?

Thank you very much David!