- The minimum required NumPy is now 2.0. [#654]
- The minimum required Astropy is now 6.1. [#654]
- The minimum required Matplotlib is now 3.9. [#654]
- Added a
to_polygonmethod to all region classes that returns aPolygonPixelRegionorPolygonSkyRegionapproximation of the region. [#649] - Improved pixel–sky coordinate conversions for non-distorted WCS objects, providing more accurate local pixel scales and North angle estimates. [#650, #651]
- Improved pixel–sky coordinate conversions for distorted WCS objects (e.g., SIP) and non-astropy WCS implementations (e.g., GWCS), enabling more accurate transformations for directed regions such as ellipses and rectangles. [#650, #651]
- Improved the string representations of all
RegionsandRegionobjects. [#653]
- The minimum required Python is now 3.11. [#598]
- The minimum required NumPy is now 1.25. [#598]
- The minimum required Astropy is now 6.0. [#598]
- The minimum required Matplotlib is now 3.8. [#598]
- The minimum required Shapely is now 2.0. [#601]
- No longer overwrites input
metaandvisiblevalues when initializing aCompoundSkyRegion. [#628]
- Added support for NumPy 2.1.
- The
regions.testfunction has been removed. Instead use thepytest --pyarg regionscommand. [#549]
- Added support for NumPy 2.0.
- The minimum required Python is now 3.10. [#547]
- The minimum required NumPy is now 1.23. [#547]
- The minimum required Astropy is now 5.1. [#547]
- The minimum required pytest-astropy is now 0.11. [#547]
- The minimum required sphinx-astropy is now 1.9. [#547]
- Fixed a bug where the text string of
TextPixelRegionandTextSkyRegionwas dropped when serializing or writing to a DS9 file. [#548]
- The minimum required Python is now 3.9. [#517]
- The minimum required NumPy is now 1.22. [#517]
- The minimum required Matplotlib is now 3.5. [#517]
- The
Regionsclass can now be initialized without any arguments. [#527] - The
Regionsextendmethod now can accept anotherRegionsobject as input. [#527]
- The
Regionsclass and itsappendandextendmethods now raise aTypeErrorfor invalid inputs. [#527]
- Region meta and visual metadata can be now input as a
dict. [#462]
- Fixed an issue with the CRTF for certain malformed input. [#448]
- Fixed a bug where DS9 serialization of an empty list raised an error. [#449]
- Added validation to
RegionMetaandRegionVisualupdateandsetdefaultmethods. [#463] - Fixed an issue reading CRTF file with labelcolor defined. [#473]
- Fixed a bug parsing CRTF files with ":" and "." coordinate separators. [#407]
- Removed the deprecated
BoundingBoxclass. UseRegionBoundingBoxinstead. [#456]
- Added the DS9 'boxcircle' point symbol. [#387]
- Added the ability to add and subtract
PixCoordobjects. [#396] - Added an
originkeyword toPolygonPixelRegionto allow specifying the vertices relative to an origin pixel. [#397] - Added a
RegularPolygonPixelRegionclass. [#398] - Added the ability to compare
Regionobjects for equality. [#421] - Added a
copymethod toRegionMetaandRegionVisual. [#424] - Added the ability to handle DS9 elliptical and rectangular annuli and multi-annuli regions. [#436]
- Added the ability to handle DS9 composite regions. [#436]
- Added the ability to serialize sky regions in the DS9 file format using
the coordinate frame of the
SkyCoordobject. [#436] - Added the ability to serialize multiple regions in the DS9 file format that have different coordinate frames. [#436]
- Added the ability to parse FITS region
rectangleandrotrectangleshapes. [#444]
- Fixed the DS9 default point symbol to use 'boxcircle'. [#387]
- Point symbol markers are no longer filled for consistency with DS9. [#387]
- Fixed an issue where plotting elliptical regions were incorrectly filled by default. [#389]
- Fixed an issue where compound region colors were being set correctly. [#389]
- Fixed an issue where sky/pixel conversions did not preserve
metaandvisualdata for some regions. [#420, #424] - Fixed an issue with elliptical and rectangular annulus regions where the outer width/height could be smaller than the inner width/height. [#425]
- Fixed an issue converting elliptical and rectangular annulus regions between pixel and sky regions. [#425]
- Fixed the string representations of
TextPixelRegionandTextSkyRegionto include quotes around the text parameter value. [#429] - Fixed many issues with the DS9 parser and serializer in not consistently handling or preserving the region coordinate frame or region parameter units. [#436]
- Fixed handling of FITS shapes that are preceded by an exclamation mark. [#444]
- Fixed a bug where written FITS region files could not be read back in. [#444]
- Removed the following deprecated I/O classes and functions:
crtf_objects_to_string,ds9_objects_to_string,fits_region_object_to_table,read_crtf,read_ds9,read_fits,read_fits_region,write_crtf,write_ds9,write_fits,write_fits_regionCRTFParser,DS9Parser,FITSRegionParser,ShapeList, andShape. TheRegionsandRegionobjects now support this functionality via a unified I/O interface. [#386] - Removed the deprecated
BoundingBoxslicesattribute. [#386] - The default matplotlib keywords that are used when plotting now depend
on the value of
self.visual['default_style']. This keyword is currently set (to a value of 'ds9') only when reading DS9 region files. If set to 'ds9', DS9 plotting defaults are used. If not set or set to 'mpl' or None, then the matplotlib defaults will be used, with the exception that fill is turned off for Patch and Line2D artists. - Renamed the
BoundingBoxclass toRegionBoundingBox. The old name is deprecated. [#427] - A
ValueErroris raised if the radius, width, or height region parameters are not strictly positive (> 0). [#430] - Added a
precisionkeyword to the DS9 serializer and writer to specify the number of decimal places in output numbers. [#436] - The
errorskeyword was removed from the DS9 parser and reader and thecoordsys,radunit, andfmtkeywords were removed from the DS9 serializer and writer. The newprecisionkeyword can be used when serializing and writing DS9 regions. [#436] - The
PixelRegion.plot()method now returns amatplotlib.artist.Artistobject, which can be used in plot legends. [#441] - FITS region files are now always parsed and serialized as
PixelRegionobjects. They can be converted toSkyRegionobjects using a WCS object. [#444]
- The infrastructure of the package has been updated in line with the
APE 17 guidelines. The main changes are that the
python setup.py testandpython setup.py build_docscommands will no longer work. The easiest way to replicate these commands is to install the tox package and runtox -e testandtox -e build_docs. It is also possible to run pytest and sphinx directly. Other significant changes include switching to setuptools_scm to manage the version number, and adding apyproject.tomlto opt in to isolated builds as described in PEP 517/518. [#315] - Bump the minimum required version of Astropy to 3.2.
- Added a
as_mpl_selectormethod to the rectangular and ellipse pixel-based regions. This method returns an interactive Matplotlib selector widget. [#317] - Added a
get_overlap_slicesmethod toBoundingBox. [#348] - Added a
centerattribute toBoundingBox. [#348] - Added
get_overlap_slicesmethod toRegionMask. [#350] - Added
get_valuesmethod toRegionMask. [#351, #353] - Added a
Regionsclass with a unified I/O interface for reading, writing, parsing, and serializing regions. [#378] - Added
serializeandwritemethods to allRegionsubclasses. [#378]
- Fixed an issue where
RegionMask.multiplyfill_valuewas not applied to pixels outside of the mask, but within the region bounding box. [#346] - Fixed an issue where
RegionMask.cutoutwould raise an error iffill_valuewas non-finite and the input array was integer type. [#346] - A
ValueErroris now raised when callingBoundingBox.sliceswhenixminoriyminis negative. [#347] - Fixed an issue in the DS9 parser where uppercase coordinate frames would fail. [#237]
- Fixed an issue where the CRTF file parser would fail if the CRTF version number was included on the first line. [#240]
- Fixed an issue where the CRTF file parser would fail if there was a space after the region name. [#271]
- Fixed an issue where the CRTF file parser was too restrictive about requiring the last and first polynomial coordinates to be the same. [#359, #362]
- Fixed a bug where an
EllipsePixelRegionwith zero height and/or width would raise aValueErrorwhen creating aRegionMask. [#363] - Fixed parsing CRTF regions files that do not have a comma after the region. [#364]
- Fixed parsing CRTF regions files that contain a
symthickvalue. [#365] - Fixed an issue where
PointPixelRegionobjects would not plot. [#366] - Fixed an issue where DS9 annulus regions with more than one annulus would not be parsed correctly. Such regions are skipped for now. [#371]
- Fixed an issue where
Anglevalues forSkyRegionshape parameters could be incorrectly serialized. [#380] - Fixed an issue where a semicolon in the DS9 text field would raise an error. [#381,#383]
- Fixed an issue where DS9 regions without metadata would not be parsed correctly. [#382]
- Fixed an issue parsing spaces in DS9 region metadata. [#384]
- Deprecated the
BoundingBoxslicesattribute. [#348] - The
RegionMetaandRegionVisualclasses have been moved to theregions.core.metadatamodule. [#371] - Deprecated the
read_fits_regionandwrite_fits_regionfunctions. Instead, use theread_fitsandwrite_fitsfunctions. Note that thewrite_fitsfunction is called aswrite_fits(regions, filename)for consistency with the other functions that write files. [#376] - The following helper functions were removed from the public API:
to_shape_list,to_crtf_meta,to_ds9_meta,CRTFRegionParser,DS9RegionParser,CoordinateParser, andFITSRegionRowParser. [#375] - Deprecated the following I/O classes and functions:
crtf_objects_to_string,ds9_objects_to_string,fits_region_object_to_table,read_crtf,read_ds9,read_fits,write_crtf,write_ds9,write_fits,CRTFParser,DS9Parser,FITSRegionParser,ShapeList, andShape. TheRegionsandRegionobjects now support this functionality via a unified I/O interface. [#378] - Existing
ds9andcrtfregion files will not be overwritten by default with thewritefunctions. Setoverwrite=Trueto overwrite existing files. [#378]
- Add region copy methods [#269]
- Add pixel region rotate method [#265]
- Added
unionandintersectionmethods to theBoundingBoxclass. [#277] - Add support for BOX in FITS regions [#255]
- Add PixCoord.xy [#247]
- Fixed a corner-case issue where
RegionMask.multiply()would not set non-finite data values outside of the mask but within the bounding box to zero. [#278] - Fix 'text' renamed to 'label' [#234]
- Remove astropy-healpix dependency [#258]
- Use standalone six to avoid deprecation warnings [#235]
- Change CRTF writer to match CASA implementation [#226]
- Simplify annulus regions [#279]
See also: regions v0.4 merged pull requests list on Github.
- Changed
as_patchtoas_artistto accommodate non-patch artists [#218] - Implemented
to_pixelforregions.CompoundSkyRegions,to_maskforregions.CompoundPixelRegionandto_pixelforregions.CircleSkyRegion. [#137] - Handling dimension and broadcast of
xandyinregions.PixCoord. [#172] - Deserialization of
CRTFfile format is possible. [#173] - Added
regions.TextPixelRegionandregions.TextSkyRegion. [#177] - Added
Shapelayer in the serialization ofDS9format. Also, implementedRegionMetaandRegionVisualto validate the meta parameters. [#179] - Serialization of
regions.Regionobject toCRTFformat is possible. [#186] - Fix mask bug for regions with negative indices. [#190]
- Improved the
plotmethods for several regions. Addedas_patchfor annulus regions. Now, uses the parameters in thevisualattributes of regions in the matplotlib plotting. Also, addedmpl_properties_defaultmethod inregions.PixelRegionto set the visual parameters to that ofDS9by default. [#194] - Now,
to_maskinregions.CompoundPixelRegionhandles negative bounding box. [#195] - Added
regions.RectangleAnnulusPixelRegion,regions.RectangleAnnulusSkyRegion,regions.EllipseAnnulusPixelRegionandregions.RectangleAnnulusSkyRegion. Also, implemented custom descriptor classes for attribute validation. [#196] - Implemented FITS Region Binary Table reader and writer. [#198]
- Renamed
Maskclass toRegionMaskand addedoriginarg toas_patchandplotmethods inregions.Regionclass. [#203] - Support for explicit formatting directives in
DS9. [#204]
See also: regions v0.3 merged pull requests list on Github.
Changelog wasn't filled.
See also: regions v0.2 merged pull requests list on Github.
Changelog wasn't filled.