Module Expr Str ImportFrom alias alias Import alias identifier ImportFrom alias identifier ClassDef bases body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If CompareNotEq NameLoad NameLoad body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index Num Assign AttributeStore NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index Num Assign AttributeStore NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index Num Assign AttributeStore NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index Num Return If CompareIsNot NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword Str orelse Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr BinOpMult Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num Assign SubscriptStore AttributeLoad NameLoad attr Index CompareGt AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index CompareGt AttributeLoad NameLoad attr Num orelse Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index CompareLtE AttributeLoad NameLoad attr Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad Num AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr NameLoad body Assign NameStore Num orelse Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr ListComp SubscriptLoad AttributeLoad NameLoad attr Index NameLoad comprehension NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp SubscriptLoad AttributeLoad NameLoad attr Index NameLoad comprehension NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp SubscriptLoad AttributeLoad NameLoad attr Index NameLoad comprehension NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp SubscriptLoad AttributeLoad NameLoad attr Index NameLoad comprehension NameStore Call NameLoad NameLoad NameLoad NameLoad Return Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad orelse If BoolOpOr Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Return Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad orelse Return ListLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If NameLoad body Return Call AttributeLoad Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr BinOpDiv AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr orelse Return Call AttributeLoad Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore IfExp Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore IfExp Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore IfExp Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore IfExp Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore IfExp Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore IfExp Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return TupleLoad Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad Num body Expr Str ImportFrom alias If BoolOpOr CompareIs NameLoad NameLoad CompareNotEq Call NameLoad NameLoad NameLoad body Assign NameStore BinOpMult ListLoad Num Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp SubscriptLoad AttributeLoad NameLoad attr Index Num comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp SubscriptLoad AttributeLoad NameLoad attr Index Num comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp BinOpDiv BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Call NameLoad BinOpSub Call AttributeLoad NameLoad attr Num comprehension NameStore NameLoad If BoolOpAnd CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Assign NameStore NameLoad If CompareIs NameLoad NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Num For NameStore NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr BinOpDiv AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num keyword Str If CompareLt NameLoad Call AttributeLoad NameLoad attr body AugAssignAdd NameStore Num AugAssignAdd SubscriptStore NameLoad Slice NameLoad NameLoad Num AugAssignAdd SubscriptStore AttributeLoad NameLoad attr Slice NameLoad NameLoad Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad NameLoad AugAssignDiv SubscriptStore AttributeLoad NameLoad attr Index CompareGt NameLoad Num SubscriptLoad NameLoad Index CompareGt NameLoad Num Return NameLoad decorator_list
N/A N/A 
    This file provides the xypoint data structure, which I use to store spectra for TelFit
    

    This file is part of the TelFit program.

    TelFit is free software: you can redistribute it and/or modify
    it under the terms of the MIT license.

    TelFit 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.

    You should have received a copy of the MIT license
    along with TelFit.  If not, see <http://opensource.org/licenses/MIT>.

 __future__ print_function division N/A numpy np astropy units u xypoint N/A N/A __init__ N/A N/A self size x y cont err array N/A 100 None None None None None N/A N/A 
          Generate an xypoint instance. Can do one of the following three things:
          1: Give a size only. This will generate an xypoint of a given size.
             You should fill it with your data in your own script
          2: Give x,y,cont,and err arrays, as np arrays. This will just
             copy the arrays into the xypoint structure
          3: Give a multidimensional array. For now at least, it must have
             shape = (size,4). That is the shape returned by np.loadtxt
             with unpack=False.
         N/A N/A array None N/A N/A N/A self x N/A array N/A N/A N/A 0 N/A N/A self y N/A array N/A N/A N/A 1 N/A N/A self cont N/A array N/A N/A N/A 2 N/A N/A self err N/A array N/A N/A N/A 3 N/A N/A N/A x None N/A N/A size N/A x size N/A N/A y None N/A N/A size N/A y size N/A N/A cont None N/A N/A size N/A cont size N/A N/A err None N/A N/A size N/A err size N/A N/A x None N/A N/A N/A self x N/A N/A np arange size dtype float64 N/A N/A N/A self x N/A N/A x copy N/A N/A y None N/A N/A N/A self y N/A N/A np zeros size N/A N/A N/A self y N/A N/A y copy N/A N/A cont None N/A N/A N/A self cont N/A N/A np ones size N/A N/A N/A self cont N/A N/A cont copy N/A N/A err None N/A N/A N/A self err N/A N/A N/A np ones N/A N/A self y size 1000000000.0 N/A N/A N/A self err N/A N/A N/A self y 0 N/A N/A np sqrt N/A N/A self y N/A N/A N/A self y 0 N/A N/A N/A self err N/A N/A err copy N/A N/A N/A self err N/A N/A N/A self err 0 1000000000.0 N/A copy N/A N/A self N/A N/A N/A copy N/A xypoint N/A N/A self x size N/A N/A copy x N/A N/A N/A self x copy N/A N/A copy y N/A N/A N/A self y copy N/A N/A copy cont N/A N/A N/A self cont copy N/A N/A copy err N/A N/A N/A self err copy N/A copy N/A size N/A N/A self N/A N/A N/A N/A N/A self x size N/A output N/A N/A self outfilename N/A N/A N/A N/A N/A np savetxt outfilename N/A N/A np transpose N/A N/A self x N/A self y N/A self cont N/A self err N/A __getitem__ N/A N/A self index N/A N/A N/A N/A isinstance index slice N/A N/A start N/A max 0 N/A index start N/A stop N/A min N/A index stop N/A N/A self size N/A N/A N/A index step None N/A N/A step 1 N/A N/A step N/A index step N/A x N/A N/A np array N/A N/A N/A self x N/A i N/A i N/A range start stop step N/A y N/A N/A np array N/A N/A N/A self y N/A i N/A i N/A range start stop step N/A cont N/A N/A np array N/A N/A N/A self cont N/A i N/A i N/A range start stop step N/A err N/A N/A np array N/A N/A N/A self err N/A i N/A i N/A range start stop step N/A N/A xypoint x x y y cont cont err err N/A N/A N/A N/A isinstance index list N/A isinstance index tuple N/A isinstance index N/A np ndarray N/A N/A x N/A N/A self x N/A index N/A y N/A N/A self y N/A index N/A cont N/A N/A self cont N/A index N/A err N/A N/A self err N/A index N/A N/A xypoint x x y y cont cont err err N/A N/A N/A N/A N/A self x N/A index N/A N/A self y N/A index N/A N/A self cont N/A index N/A N/A self err N/A index N/A __len__ N/A N/A self N/A N/A N/A N/A N/A self size N/A toarray N/A N/A self norm N/A False N/A N/A 
        Turns the data structure into a multidimensional np array
        If norm == True, it will have shape self.size(), 2 and the y
          axis will be divided by the continuum axis
        Otherwise, it will have shape self.size(), 4
         N/A norm N/A N/A N/A N/A N/A N/A np array N/A N/A self x N/A N/A self y N/A self cont transpose N/A N/A N/A N/A N/A N/A np array N/A N/A self x N/A self y N/A self cont N/A self err transpose N/A strip_units N/A N/A self N/A N/A N/A 
        Strips units from an xypoint structure.

        Returns:
          A copy of the xypoint with no units
          The x-units
          the y-units
         N/A xunits N/A N/A isinstance N/A self x N/A u Quantity N/A N/A self x unit 1.0 N/A yunits N/A N/A isinstance N/A self y N/A u Quantity N/A N/A self y unit 1.0 N/A x N/A N/A isinstance N/A self x N/A u Quantity N/A N/A self x value N/A self x N/A y N/A N/A isinstance N/A self y N/A u Quantity N/A N/A self y value N/A self y N/A err N/A N/A isinstance N/A self err N/A u Quantity N/A N/A self err value N/A self err N/A cont N/A N/A isinstance N/A self cont N/A u Quantity N/A N/A self cont value N/A self cont N/A N/A N/A xypoint x x y y cont cont err err xunits yunits N/A N/A CombineXYpoints N/A N/A xypts snr xspacing numpoints interp_order N/A None None None 3 N/A N/A 
    Function to combine a list of xypoints into a single
      xypoint. Useful for combining several orders/chips
      or for coadding spectra

    Warning! This function is basically un-tested! It is NOT used
    in TelFit!

      ***Optional keywords***
      snr: the spectra will be weighted by the signal-to-noise ratio
           before adding
      xspacing: the x-spacing in the final array
      numpoints: the number of points in the final array. If neither
                 numpoints nor xspacing is given, the x-spacing in the
                 final array will be determined by averaging the spacing
                 in each of the xypoints.
      interp_order: the interpolation order. Default is cubic
     scipy.interpolate InterpolatedUnivariateSpline N/A N/A N/A snr None N/A N/A type snr list N/A N/A snr N/A N/A 1.0 N/A len xypts N/A first N/A N/A np min N/A N/A N/A o x N/A 0 N/A o xypts N/A last N/A N/A np max N/A N/A N/A o x N/A -1 N/A o xypts N/A avg_spacing N/A N/A np mean N/A N/A N/A N/A N/A o x N/A -1 N/A N/A o x N/A 0 N/A float N/A N/A N/A o size 1 N/A o xypts N/A N/A N/A xspacing None N/A numpoints None N/A N/A xspacing avg_spacing N/A N/A numpoints None N/A N/A N/A xspacing None N/A N/A xspacing avg_spacing N/A numpoints N/A N/A last first xspacing N/A x N/A N/A np linspace first last numpoints N/A full_array N/A xypoint x x y N/A N/A np zeros N/A x size N/A numvals N/A N/A np zeros N/A x size dtype N/A np float N/A normalization 0.0 N/A xypt xypts N/A N/A interpolator N/A InterpolatedUnivariateSpline N/A xypt x N/A N/A xypt y N/A xypt cont k interp_order N/A left N/A N/A np searchsorted N/A full_array x N/A N/A xypt x N/A 0 N/A right N/A N/A np searchsorted N/A full_array x N/A N/A xypt x N/A -1 side right N/A N/A right N/A N/A xypt size N/A N/A right 1 N/A N/A numvals N/A left right 1.0 N/A N/A N/A full_array y N/A left right N/A interpolator N/A N/A full_array x N/A left right N/A N/A N/A full_array y N/A N/A numvals 0 N/A numvals N/A N/A numvals 0 N/A full_array N/A