# GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>, # or write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # import math import os.path import numpy import copy from Tigger import startup_dprint startup_dprint(1, "starting ModelClasses") DEG = 180 / math.pi AtomicTypes = dict(bool=bool, int=int, float=float, complex=complex, str=str, list=list, tuple=tuple, dict=dict, NoneType=lambda x: None) class ModelItem(object):
# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>, # or write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # from __future__ import print_function, division, absolute_import import Tigger from Tigger import startup_dprint startup_dprint(1, "start of Coordinates") import math import numpy import traceback import warnings import numpy as np from numpy import sin, cos, arcsin startup_dprint(1, "imported numpy") from astropy.io import fits as pyfits startup_dprint(1, "imported pyfits") DEG = math.pi / 180
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>, # or write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # import math import os.path import numpy import copy from Tigger import startup_dprint startup_dprint(1,"starting ModelClasses"); DEG = 180/math.pi; AtomicTypes = dict(bool=bool,int=int,float=float,complex=complex,str=str,list=list,tuple=tuple,dict=dict,NoneType=lambda x:None); class ModelItem (object): """ModelItem is a base class for all model items. ModelItem provides functions for saving, loading, and initializing items, using class attributes that describe the item's structure. A ModelItem has a number of named attributes (both mandatory and optional), which are sufficient to fully describe the item. A ModelItem is constructed by specifying its attribute values. Mandatory attributes are passed as positional arguments to the constructor, while optional attributes are passed as keyword arguments. 'mandatory_attrs' is a class data member that provides a list of mandatory attributes.
# (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>, # or write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # import Tigger from Tigger import startup_dprint startup_dprint(1,"start of Coordinates"); import sys import math import numpy from numpy import sin,cos,arcsin,arccos; startup_dprint(1,"imported numpy"); import Kittens.utils pyfits = Kittens.utils.import_pyfits(); startup_dprint(1,"imported pyfits"); DEG = math.pi/180; startup_dprint(1,"importing WCS");
import numpy import os.path try: from PyQt5.Qt import QObject from PyQt5.Qt import pyqtSignal except ImportError: qt_available = False pass else: qt_available = True from Tigger import startup_dprint startup_dprint(1, "starting ModelClasses") DEG = 180 / math.pi AtomicTypes = dict(bool=bool, int=int, float=float, complex=complex, str=str, list=list, tuple=tuple, dict=dict, NoneType=lambda x: None) if qt_available: