roll_map

pfsspy.utils.roll_map(m, lh_edge_lon: Unit("deg") = <Quantity 0. deg>, method='interp')

Roll an input synoptic map so that it’s left edge corresponds to a specific Carrington longitude.

Roll is performed by changing the FITS header parameter “CRVAL1” to the new value of the reference pixel (FITS header parameter CRPIX1) corresponding to aligning the left hand edge of the map with lh_edge_lon. The altered header is provided to reproject to produce the new map.

Parameters:
  • m (sunpy.map.GenericMap) – Input map

  • lh_edge_lon (float) – Desired Carrington longitude (degrees) for left hand edge of map. Default is 0.0 which results in a map with the edges at 0/360 degrees Carrington longitude. Input value must be in the range [0,360]

  • method (str) – Reprojection method to use. Can be 'interp' (default), 'exact', or 'adaptive'. See reproject for a description of the different methods. Note that different methods will give different results, and not all will conserve flux.

Returns:

output_map – Re-projected map. All metadata is preserved, apart from CRVAL1 which encodes the longitude of the reference pixel in the image, and which is updated to produce the correct roll.

Return type:

sunpy.map.GenericMap

See also

reproject