Commit 8552a492 authored by Ambra Di Piano's avatar Ambra Di Piano
Browse files

substitute pyregion w regions

parent baa2e9f1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@
# *******************************************************************************

import os
import pyregion
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
@@ -20,12 +19,13 @@ from astropy import units as u
from astropy.wcs import WCS
from astropy.io import fits
from scipy.interpolate import interp1d
from regions import Regions


# handle DS9 regiond (wip) ---!
def handleReg(reg, col='black'):
  '''Returns regions from a DS9-like regione file.'''
  r = pyregion.open(reg)
  r = Regions.read('my_regions.reg', format='ds9')
  r[0].attr[1]['color'] = col
  return r