Main SPLAT module (alternative format)

class splat.Spectrum(*args, **kwargs)
Description:

Primary class for containing spectral and source data for SpeX Prism Library.

Parameters:
  • ismodel (optional, default = False) –
  • wlabel (optional, default = 'Wavelength') – label of wavelength
  • wunit (optional, default = u.micron) – unit in which wavelength is measured
  • wunit_label (optional, default = mu m) – label of the unit of wavelength
  • flabel (optional, default = F_lambda`) – label of flux density
  • fscale (optional, default = '') – string describing how flux density is scaled
  • funit (optional, default = u.erg/(u.cm**2 * u.s * u.micron)) – unit in which flux density is measured
  • funit_label (optional, default = erg cm^-2 s^-1 micron^-1`) – label of the unit of flux density
  • resolution (optional, default = 150) –
  • slitpixelwidth (optional, default = 3.33) – Width of the slit measured in subpixel values.
  • slitwidth (optional, default = slitpixelwidth * 0.15) – Actual width of the slit, measured in arc seconds. Default value is the slitpixelwidth multiplied by the spectrograph pixel scale of 0.15 arcseconds.
  • header (optional, default = Table()) – header info of the spectrum
  • filename (optional, default = '') – a string containing the spectrum’s filename.
  • file (optional, default = '') – same as filename
  • idkey (optional, default = False) – spectrum key of the desired spectrum
Example:
>>> import splat
>>> sp = splat.Spectrum(filename='myspectrum.fits')      # read in a file
>>> sp = splat.Spectrum('myspectrum.fits')               # same
>>> sp = splat.Spectrum(10002)                           # read in spectrum with idkey = 10002
>>> sp = splat.Spectrum(wave=wavearray,flux=fluxarray)   # create objects with wavelength & flux arrays
computeSN()
Purpose:

Compute a representative S/N value as the median value of S/N among the top 50% of flux values

Output:

the S/N value

Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.computeSN()
115.96374031163553
copy()
Purpose:Make a copy of a Spectrum object
export(*args, **kwargs)
Purpose:Exports a Spectrum object to either a fits or ascii file, depending on file extension given. If no filename is explicitly given, the Spectrum.filename attribute is used. If the filename does not include the full path, the file is saved in the current directory. Spectrum.export and Spectrum.save function in the same manner.
Parameters:

filename (optional, default = Spectrum.simplefilename) – String specifying the filename to save

Output:

An ascii or fits file with the data

Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.export('/Users/adam/myspectrum.txt')
>>> from astropy.io import ascii
>>> data = ascii.read('/Users/adam/myspectrum.txt',format='tab')
>>> data
 <Table length=564>
   wavelength          flux          uncertainty
    float64          float64           float64
 -------------- ----------------- -----------------
 0.645418405533               0.0               nan
 0.647664904594 6.71920214475e-16 3.71175052033e-16
 0.649897933006 1.26009925777e-15 3.85722895842e-16
 0.652118623257 7.23781818374e-16 3.68178778862e-16
 0.654327988625 1.94569566622e-15 3.21007116982e-16
 ...
flamToFnu()
Purpose:

Converts flux density from F_lambda to F_nu, the latter in Jy. This routine changes the underlying Spectrum object. There is no change if the spectrum is already in F_nu units.

Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.flamToFnu()
>>> sp.flux.unit
 Unit("Jy")
fluxCalibrate(filter, mag, **kwargs)
Purpose:

Flux calibrates a spectrum given a filter and a magnitude. The filter must be one of those listed in splat.FILTERS.keys(). It is possible to specifically set the magnitude to be absolute (by default it is apparent). This function changes the Spectrum object’s flux, noise and variance arrays.

Parameters:
  • filter (string, default = None) – name of filter
  • mag (float, default = None) – magnitude to scale too
  • absolute (Boolean, optional, default = False) – given magnitude is an absolute magnitude
  • apparent (Boolean, optional, default = False) – given magnitude is an apparent magnitude
Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.fluxCalibrate('2MASS J',15.0)
>>> splat.filterMag(sp,'2MASS J')
 (15.002545668628173, 0.017635234089677564)
fluxMax(**kwargs)
Purpose:

Reports the maximum flux of a Spectrum object ignoring nan’s.

Parameters:

maskTelluric (optional, default = True) – masks telluric regions

Output:

maximum flux (with units)

Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.normalize()
>>> sp.fluxMax()
<Quantity 1.0 erg / (cm2 micron s)>
fnuToFlam()
Purpose:

Converts flux density from F_nu to F_lambda, the latter in erg/s/cm2/Hz. This routine changes the underlying Spectrum object. There is no change if the spectrum is already in F_lambda units.

Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.flamToFnu()
>>> sp.flux.unit
 Unit("Jy")
>>> sp.fnuToFlam()
>>> sp.flux.unit
 Unit("erg / (cm2 micron s)")
info()
Purpose:

Returns a summary of properties for the Spectrum object

Output:

Text summary

Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.info()
 Spectrum of NLTT 184
 Observed on 20071012
 at an airmass of 1.145
 Full source designation is J00054517+0723423
 Median S/N = 97.0
 SPLAT source key is 10012.0
 SPLAT spectrum key is 10857
 Data published in Kirkpatrick, J. D. et al. (2010, ApJS, 190, 100-146)
 History:
 Spectrum successfully loaded
normalize(**kwargs)
Purpose:

Normalize a spectrum to a maximum value of 1 (in its current units)

Parameters:

waveRange (optional, default = None) – choose the wavelength range to normalize; can be a list specifying minimum and maximum or a single number to normalize around a particular point

Output:

maximum flux (with units)

Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.normalize()
>>> sp.fluxMax()
<Quantity 1.0 erg / (cm2 micron s)>
>>> sp.normalize(waverange=[2.25,2.3])
>>> sp.fluxMax()
<Quantity 1.591310977935791 erg / (cm2 micron s)>
plot(**kwargs)
Purpose:calls the plotSpectrum function, by default showing the noise spectrum and zeropoints. See the plotSpectrum API listing for details.
Output:

A plot of the Spectrum object

Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.plot()
reset()
Purpose:

Restores a Spectrum to its original read-in state, removing scaling and smoothing. This routine changes the Spectrum object directly and there is no output.

Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.fluxMax()
<Quantity 4.561630292384622e-15 erg / (cm2 micron s)>
>>> sp.normalize()
>>> sp.fluxMax()
<Quantity 0.9999999403953552 erg / (cm2 micron s)>
>>> sp.reset()
>>> sp.fluxMax()
<Quantity 4.561630292384622e-15 erg / (cm2 micron s)>
save(*args, **kwargs)
Purpose:Exports a Spectrum object to either a fits or ascii file, depending on file extension given. If no filename is explicitly given, the Spectrum.filename attribute is used. If the filename does not include the full path, the file is saved in the current directory. Spectrum.export and Spectrum.save function in the same manner.
scale(factor, **kwargs)
Purpose:

Scales a Spectrum object’s flux and noise values by a constant factor. This routine changes the Spectrum object directly.

Parameters:

factor (required, default = None) – A floating point number used to scale the Spectrum object

Output:

maximum flux (with units)

Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.fluxMax()
<Quantity 1.0577336634332284e-14 erg / (cm2 micron s)>
>>> sp.computeSN()
124.5198
>>> sp.scale(1.e15)
>>> sp.fluxMax()
<Quantity 1.0577336549758911 erg / (cm2 micron s)>
>>> sp.computeSN()
124.51981
showHistory()
Purpose:

Report history of actions taken on a Spectrum object. This can also be retrieved by printing the attribute Spectrum.history

Output:

List of actions taken on spectrum

Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.normalize()
>>> sp.fluxCalibrate('2MASS J',15.0)
>>> sp.showHistory()
 Spectrum successfully loaded
 Spectrum normalized
 Flux calibrated with 2MASS J filter to an apparent magnitude of 15.0
smooth(**kwargs)
Purpose:

Smoothes a spectrum either by selecting a constant slit width (smooth in spectral dispersion space), pixel width (smooth in pixel space) or resolution (smooth in velocity space). One of these options must be selected for any smoothing to happen. Changes spectrum directly.

Parameters:
Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.smoothfluxMax()
<Quantity 1.0577336634332284e-14 erg / (cm2 micron s)>
>>> sp.computeSN()
124.5198
>>> sp.scale(1.e15)
>>> sp.fluxMax()
<Quantity 1.0577336549758911 erg / (cm2 micron s)>
>>> sp.computeSN()
124.51981
smoothToResolution(resolution, **kwargs)
Purpose:

Smoothes a spectrum to a constant or resolution (smooth in velocity space). Changes spectrum directly. Note that no smoothing is done if requested resolution is greater than the current resolution

Parameters:
Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.resolution()
120
>>> sp.computeSN()
21.550974
>>> sp.smoothToResolution(50)
>>> sp.resolution()
50
>>> sp.computeSN()
49.459522314460855
smoothToSlitPixelWidth(width, **kwargs)
Purpose:

Smoothes a spectrum to a constant slit pixel width (smooth in pixel space). Changes spectrum directly. Note that no smoothing is done if requested width is greater than the current slit width.

Parameters:
Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.slitpixelwidth
3.33
>>> sp.resolution
120
>>> sp.computeSN()
105.41789
>>> sp.smoothToSlitPixelWidth(10)
>>> sp.slitpixelwidth
10
>>> sp.resolution
39.96
>>> sp.computeSN()
235.77536310249229
smoothToSlitWidth(width, **kwargs)
Purpose:

Smoothes a spectrum to a constant slit angular width (smooth in dispersion space). Changes spectrum directly. Note that no smoothing is done if requested width is greater than the current slit width.

Parameters:
Output:

maximum flux (with units)

Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.slitwidth
0.4995
>>> sp.resolution
120
>>> sp.computeSN()
105.41789
>>> sp.smoothToSlitWidth(2.0)
>>> sp.slitwidth
2.0
>>> sp.resolution
29.97
>>> sp.computeSN()
258.87135134070593
surface(radius)
Purpose:Convert to surface fluxes given a radius, assuming at absolute fluxes

Note

Unfinished

trim(range, **kwargs)
Purpose:Trims a spectrum to be within a certain wavelength range or set of ranges. Data outside of these ranges are excised from the wave, flux and noise arrays. The full spectrum can be restored with the reset() procedure.
Parameters:range – the range(s) over which the spectrum is retained - a series of nested 2-element arrays
Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.smoothfluxMax()
<Quantity 1.0577336634332284e-14 erg / (cm2 micron s)>
>>> sp.computeSN()
124.5198
>>> sp.scale(1.e15)
>>> sp.fluxMax()
<Quantity 1.0577336549758911 erg / (cm2 micron s)>
>>> sp.computeSN()
124.51981
waveRange()
Purpose:

Return the wavelength range of the current Spectrum object.

Output:

2-element array giving minimum and maximum of wavelength range

Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> sp.slitwidth
[<Quantity 0.6447611451148987 micron>, <Quantity 2.5517737865448 micron>]
splat.caldateToDate(d)
Purpose:

Convert from numeric date to calendar date, and vice-versa.

Parameters:

d – A numeric date of the format ‘20050412’, or a date in the calendar format ‘2005 Jun 12’

Example:
>>> import splat
>>> caldate = splat.dateToCaldate('20050612')
>>> print caldate
2005 Jun 12
>>> date = splat.caldateToDate('2005 June 12')
>>> print date
20050612
splat.checkAccess(**kwargs)
Purpose:

Checks if user has access to unpublished spectra in SPLAT library.

Example:
>>> import splat
>>> print splat.checkAccess()
True
Note:

Must have the file .splat_access in your home directory with the correct passcode to use.

splat.checkFile(filename, **kwargs)
Purpose:

Checks if a spectrum file exists in the SPLAT’s library.

Parameters:

filename – A string containing the spectrum’s filename.

Example:
>>> import splat
>>> spectrum1 = 'spex_prism_1315+2334_110404.fits'
>>> print splat.checkFile(spectrum1)
True
>>> spectrum2 = 'fake_name.fits'
>>> print splat.checkFile(spectrum2)
False
splat.checkKeys(input, parameters, **kwargs)
Purpose:

Checks the input kwargs keys against the expected parameters of a function to make sure the right parameters are passed.

Parameters:
  • input – input dictionary to a function (i.e., kwargs).
  • parameters – allowed parameters for the function
  • forcekey – (optional, default = False) if True, raises a Value Error if an incorrect parameter is passed
splat.checkLocal(inputfile)
Purpose:

Checks if a file is present locally or within the SPLAT code directory

Example:
>>> import splat
>>> splat.checkLocal('splat.py')
True  # found the code
>>> splat.checkLocal('parameters.txt')
False  # can't find this file
>>> splat.checkLocal('SpectralModels/BTSettl08/parameters.txt')
True  # found it
splat.checkOnline(*args)
Purpose:

Checks if SPLAT’s URL is accessible from your machine– that is, checks if you and the host are online. Alternately checks if a given filename is present locally or online

Example:
>>> import splat
>>> splat.checkOnline()
True  # SPLAT's URL was detected.
>>> splat.checkOnline()
False # SPLAT's URL was not detected.
>>> splat.checkOnline('SpectralModels/BTSettl08/parameters.txt')
'' # Could not find this online file.
splat.classifyByIndex(sp, *args, **kwargs)
Purpose:

Determine the spectral type and uncertainty for a spectrum based on indices. Makes use of published index-SpT relations from Reid et al. (2001); Testi et al. (2001); Allers et al. (2007); and Burgasser (2007). Returns 2-element tuple containing spectral type (numeric or string) and uncertainty.

Parameters:
  • sp – Spectrum class object, which should contain wave, flux and noise array elements.
  • set (optional, default = 'burgasser') –

    named set of indices to measure and compute spectral type

  • string (optional, default = False) – return spectral type as a string (uses typeToNum)
  • round (optional, default = False) – rounds off to nearest 0.5 subtypes
  • allmeasures (optional, default = False) – Set to True to return all of the index values and individual subtypes
  • remeasure (optional, default = True) – force remeasurement of indices
  • nsamples (optional, default = 100) – number of Monte Carlo samples for error computation
  • nloop (optional, default = 5) – number of testing loops to see if spectral type is within a certain range
Example:
>>> import splat
>>> spc = splat.getSpectrum(shortname='0559-1404')[0]
>>> splat.classifyByIndex(spc, string=True, set='burgasser', round=True)
    ('T4.5', 0.2562934083414341)

Note

  • Need to allow output of individual spectral types from individual indices
splat.classifyByStandard(sp, *args, **kwargs)
Purpose:

Determine the spectral type and uncertainty for a spectrum by direct comparison to defined spectral standards. Dwarf standards span M0-T9 and include the standards listed in Burgasser et al. (2006), Kirkpatrick et al. (2010) and Cushing et al. (2011). Comparison to subdwarf and extreme subdwarf standards may also be done. Returns the best match or an F-test weighted mean and uncertainty. There is an option to follow the procedure of Kirkpatrick et al. (2010), fitting only in the 0.9-1.4 micron region.

Output:

A tuple listing the best match standard and uncertainty based on F-test weighting and systematic uncertainty of 0.5 subtypes

Parameters:
  • sp – Spectrum class object, which should contain wave, flux and noise array elements.
  • sp – required
  • sptrange (optional, default = ['M0','T9']) – Set to the spectral type range over which comparisons should be made, can be a two-element array of strings or numbers
  • statistic (optional, default = 'chisqr') –

    string defining which statistic to use in comparison; available options are:

    • ‘chisqr’: compare by computing chi squared value (requires spectra with noise values)
    • ‘stddev’: compare by computing standard deviation
    • ‘stddev_norm’: compare by computing normalized standard deviation
    • ‘absdev’: compare by computing absolute deviation
  • method (optional, default = '') –

    set to 'kirkpatrick' to follow the Kirkpatrick et al. (2010) method, fitting only to the 0.9-1.4 micron band

  • best (optional, default = True) – Set to True to return the best fit standard type
  • average (optional, default = False) – Set to True to return an chi-square weighted type only
  • compareto (optional, default = None) – Set to the single standard (string or number) you want to compare to
  • plot (optional, default = False) – Set to True to generate a plot comparing best fit template to source; can also set keywords associated with plotSpectrum routine
  • string (optional, default = True) – return spectral type as a string
  • verbose (optional, default = False) – Set to True to give extra feedback

Users can also set keyword parameters defined in plotSpectrum and compareSpectra routine.

Example:
>>> import splat
>>> sp = splat.getSpectrum(lucky=True)[0]
>>> result = splat.classifyByStandard(sp,verbose=True)
    Using dwarf standards
    Type M3.0: statistic = 5763368.10355, scale = 0.000144521824721
    Type M2.0: statistic = 5613862.67356, scale = 0.000406992798674
    Type T8.0: statistic = 18949835.2087, scale = 9.70960919364
    Type T9.0: statistic = 21591485.163, scale = 29.1529786804
    Type L8.0: statistic = 3115605.62687, scale = 1.36392504072
    Type L9.0: statistic = 2413450.79206, scale = 0.821131769522
    ...
    Best match to L1.0 spectral standard
    Best spectral type = L1.0+/-0.5
>>> result
    ('L1.0', 0.5)
>>> splat.classifyByStandard(sp,sd=True,average=True)
    ('sdL0.0:', 1.8630159149200021)
splat.classifyByTemplate(sp, *args, **kwargs)
Purpose:

Determine the spectral type and uncertainty for a spectrum by direct comparison to a large set of spectra in the library. Returns a dictionary with the best spectral type (F-test weighted mean and uncertainty), and arrays for the N best-matching Spectrum objects, scale factors, spectral types and comparison statistics. There is an option to follow the procedure of Kirkpatrick et al. (2010), fitting only in the 0.9-1.4 micron region. It is strongly encouraged that users winnow down the templates used in the comparison by selecting templates using the searchLibrary options or optionally the set parameter.

Output:

A dictionary containing the following keys:

  • result: a tuple containing the spectral type and its uncertainty based on F-test statistic
  • statistic: array of N best statistical comparison values
  • scale: array of N best optimal scale factors
  • spectra: array of N best Spectrum objects
  • spt: array of N best spectral types
Parameters:
  • sp – Spectrum class object, which should contain wave, flux and noise array elements.
  • sp – required
  • statistic (optional, default = 'chisqr') –

    string defining which statistic to use in comparison; available options are:

    • ‘chisqr’: compare by computing chi squared value (requires spectra with noise values)
    • ‘stddev’: compare by computing standard deviation
    • ‘stddev_norm’: compare by computing normalized standard deviation
    • ‘absdev’: compare by computing absolute deviation
  • select (optional, default = '') –

    string defining which spectral template set you want to compare to; several options which can be combined:

    • m dwarf: fit to M dwarfs only
    • l dwarf: fit to M dwarfs only
    • t dwarf: fit to M dwarfs only
    • vlm: fit to M7-T9 dwarfs
    • optical: only optical classifications
    • high sn: median S/N greater than 100
    • young: only young/low surface gravity dwarfs
    • companion: only companion dwarfs
    • subdwarf: only subdwarfs
    • single: only dwarfs not indicated a binaries
    • spectral binaries: only dwarfs indicated to be spectral binaries
    • standard: only spectral standards (Note: use classifyByStandard instead)
  • method (optional, default = '') –

    set to 'kirkpatrick' to follow the Kirkpatrick et al. (2010) method, fitting only to the 0.9-1.4 micron band

  • best (optional, default = False) – Set to True to return only the best fit template type
  • nbest (optional, default = 1) – Set to the number of best fitting spectra to return
  • maxtemplates (optional, default = 100) – Set to the maximum number of templates that should be fit
  • force (optional, default = False) – By default, classifyByTemplate won’t proceed if you have more than 100 templates; set this parameter to True to ignore that constraint
  • plot (optional, default = False) – Set to True to generate a plot comparing best fit template to source; can also set keywords associated with plotSpectrum routine
  • string (optional, default = True) – return spectral type as a string
  • verbose (optional, default = False) – give lots of feedback

Users can also set keyword parameters defined in plotSpectrum and searchLibrary routines

Example:
>>> import splat
>>> sp = splat.getSpectrum(shortname='1507-1627')[0]
>>> result = splat.classifyByTemplate(sp,string=True,spt=[24,26],nbest=5)
    Too many templates (171) for classifyByTemplate; set force=True to override this
>>> result = splat.classifyByTemplate(sp,string=True,spt=[24,26],snr=50,nbest=5)
    Comparing to 98 templates
    LHS 102B L5.0 10488.1100432 11.0947838116
    2MASSI J0013578-223520 L4.0 7037.37441677 136.830522173
    SDSS J001608.44-004302.3 L5.5 15468.6209466 274.797693706
    2MASSI J0028394+150141 L4.5 63696.1897668 187.266152375
    ...
    Best match = DENIS-P J153941.96-052042.4 with spectral type L4:
    Mean spectral type = L4.5+/-0.718078660103
>>> result
    {'result': ('L4.5', 0.71807866010293797),
     'scale': [3.0379089778408642e-14,
      96.534933767992072,
      3.812718429200959,
      2.9878801833735986e-14,
      3.0353579048704484e-14],
     'spectra': [Spectrum of DENIS-P J153941.96-052042.4,
      Spectrum of 2MASSI J0443058-320209,
      Spectrum of SDSSp J053951.99-005902.0,
      Spectrum of 2MASSI J1104012+195921,
      Spectrum of 2MASS J17502484-0016151],
     'spt': [24.0, 25.0, 25.0, 24.0, 25.5],
     'statistic': [<Quantity 2108.997879536768>,
      <Quantity 2205.640664932956>,
      <Quantity 2279.316858783139>,
      <Quantity 2579.0089210846527>,
      <Quantity 2684.003187310027>]}
splat.classifyGravity(sp, *args, **kwargs)
Purpose:

Determine the gravity classification of a brown dwarf using the method of Allers & Liu (2013).

Parameters:
  • sp (required) – Spectrum class object, which should contain wave, flux and noise array elements. Must be between M6.0 and L7.0.
  • spt (optional, default = False) – spectral type of sp. Must be between M6.0 and L7.0
  • indices (optional, default = 'allers') – specify indices set using measureIndexSet.
  • plot (optional, default = False) – Set to True to plot sources against closest dwarf spectral standard
  • allscores (optional, default = False) – Set to True to return a dictionary containing the gravity scores from individual indices
  • verbose (optional, default = False) – Give feedback while computing
Output:

Either a string specifying the gravity classification or a dictionary specifying the gravity scores for each index

Example:
>>> import splat
>>> sp = splat.getSpectrum(shortname='1507-1627')[0]
>>> splat.classifyGravity(sp)
    FLD-G
>>> result = splat.classifyGravity(sp, allscores = True, verbose=True)
    Gravity Classification:
        SpT = L4.0
        VO-z: 1.012+/-0.029 => 0.0
        FeH-z: 1.299+/-0.031 => 1.0
        H-cont: 0.859+/-0.032 => 0.0
        KI-J: 1.114+/-0.038 => 1.0
        Gravity Class = FLD-G
>>> result
    {'FeH-z': 1.0,
     'H-cont': 0.0,
     'KI-J': 1.0,
     'VO-z': 0.0,
     'gravity_class': 'FLD-G',
     'score': 0.5,
     'spt': 'L4.0'}
splat.compareSpectra(sp1, sp2, *args, **kwargs)
Purpose:

Compare two spectra against each other using a pre-selected statistic. Returns the value of the desired statistic as well as the optimal scale factor. Minimum possible value for statistic is 1.e-9.

Parameters:
  • sp1 (required) – First spectrum class object, which sets the wavelength scale
  • sp2 (required) – Second spectrum class object, interpolated onto the wavelength scale of sp1
  • statistic (optional, default = 'chisqr') –

    string defining which statistic to use in comparison; available options are:

    • ‘chisqr’: compare by computing chi squared value (requires spectra with noise values)
    • ‘stddev’: compare by computing standard deviation
    • ‘stddev_norm’: compare by computing normalized standard deviation
    • ‘absdev’: compare by computing absolute deviation
  • fit_ranges (optional, default = [0.65,2.45]) – 2-element array or nested array of 2-element arrays specifying the wavelength ranges to be used for the fit, assumed to be measured in microns. This is effectively the opposite of mask_ranges.
  • weights (optional, default = [1, ..., 1] for len(sp1.wave)) – Array specifying the weights for individual wavelengths; must be an array with length equal to the wavelength scale of sp1; need not be normalized
  • mask_ranges (optional, default = None) – Multi-vector array setting wavelength boundaries for masking data, assumed to be in microns
  • mask (optional, default = [0, ..., 0] for len(sp1.wave)) – Array specifiying which wavelengths to mask; must be an array with length equal to the wavelength scale of sp1 with only 0 (OK) or 1 (mask).
  • mask_telluric (optional, default = False) – Set to True to mask pre-defined telluric absorption regions
  • mask_standard (optional, default = False) – Like mask_telluric, with a slightly tighter cut of 0.80-2.35 micron
  • novar2 (optional, default = True) – Set to True to compute statistic without considering variance of sp2
  • plot (optional, default = False) – Set to True to plot sp1 with scaled sp2 and difference spectrum overlaid
  • verbose (optional, default = False) – Set to True to report things as you’re going along
Example:
>>> import splat
>>> import numpy
>>> sp1 = splat.getSpectrum(shortname = '2346-3153')[0]
    Retrieving 1 file
>>> sp2 = splat.getSpectrum(shortname = '1421+1827')[0]
    Retrieving 1 file
>>> sp1.normalize()
>>> sp2.normalize()
>>> splat.compareSpectra(sp1, sp2, statistic='chisqr')
    (<Quantity 19927.74527822856>, 0.94360732593223595)
>>> splat.compareSpectra(sp1, sp2, statistic='stddev')
    (<Quantity 3.0237604611215705 erg2 / (cm4 micron2 s2)>, 0.98180983971456637)
>>> splat.compareSpectra(sp1, sp2, statistic='absdev')
    (<Quantity 32.99816249949072 erg / (cm2 micron s)>, 0.98155779612333172)
>>> splat.compareSpectra(sp1, sp2, statistic='chisqr', novar2=False)
    (<Quantity 17071.690727945213>, 0.94029474635786015)
splat.coordinateToDesignation(c)
Purpose:Converts right ascension and declination into a designation string
Parameters:c – RA and Dec coordinate to be converted; can be a SkyCoord object with units of degrees, a list with RA and Dec in degrees, or a string with RA measured in hour angles and Dec in degrees
Output:Designation string
Example:
>>> import splat
>>> from astropy.coordinates import SkyCoord
>>> c = SkyCoord(238.86, 9.90, unit="deg")
>>> print splat.coordinateToDesignation(c)
    J15552640+0954000
>>> print splat.coordinateToDesignation([238.86, 9.90])
    J15552640+0954000
>>> print splat.coordinateToDesignation('15:55:26.4 +09:54:00.0')
    J15552640+0954000
splat.dateToCaldate(date)
Purpose:Converts numeric date to calendar date
Parameters:date – String in the form ‘YYYYMMDD’
Output:Date in format YYYY MMM DD
Example:
>>> import splat
>>> splat.dateToCaldate('19940523')
    1994 May 23
splat.designationToCoordinate(value, **kwargs)
Purpose:

Convert a designation srtring into a RA, Dec tuple or ICRS SkyCoord objects (default)

Parameters:
  • value (required) – Designation string with RA measured in hour angles and Dec in degrees
  • icrs (optional, defualt = True) – returns astropy SkyCoord coordinate in ICRS frame if True
Output:

Coordinate, either as [RA, Dec] or SkyCoord object

Example:
>>> import splat
>>> splat.designationToCoordinate('J1555264+0954120')
<SkyCoord (ICRS): (ra, dec) in deg
    (238.8585, 9.90333333)>
splat.designationToShortName(value)
Purpose:Produce a shortened version of designation
Parameters:value (required) – Designation string with RA measured in hour angles and Dec in degrees
Output:Shorthand designation string
Example:
>>> import splat
>>> print splat.designationToShortName('J1555264+0954120')
    J1555+0954
splat.distributionStats(x, q=[0.16, 0.5, 0.84], weights=None, sigma=None, **kwargs)
Purpose:Find key values along distributions based on quantile steps. This code is derived almost entirely from triangle.py.
splat.estimateDistance(*args, **kwargs)
Purpose:

Takes the apparent magnitude and either takes or determines the absolute magnitude, then uses the magnitude/distance relation to estimate the distance to the object in parsecs. Returns estimated distance and uncertainty in parsecs

Parameters:
  • sp – Spectrum class object, which should be flux calibrated to its empirical apparent magnitude
  • mag (optional, default = False) – apparent magnitude of sp
  • mag_unc (optional, default = 0) – uncertainty of the apparent magnitude
  • absmag (optional, default = False) – absolute magnitude of sp
  • absmag_unc (optional, default = 0) – uncertainty of the absolute magnitude
  • spt (optional, default = False) – spectral type of sp
  • spt_e (optional, default = 0) – uncertainty of the spectral type
  • nsamples (optional, default = 100) – number of samples to use in Monte Carlo error estimation
  • filter (optional, default = False) –

    Name of filter, must be one of the following:

    • ‘2MASS J’, ‘2MASS H’, ‘2MASS Ks’
    • ‘MKO J’, ‘MKO H’, ‘MKO K’, MKO Kp’, ‘MKO Ks’
    • ‘NICMOS F090M’, ‘NICMOS F095N’, ‘NICMOS F097N’, ‘NICMOS F108N’
    • ‘NICMOS F110M’, ‘NICMOS F110W’, ‘NICMOS F113N’, ‘NICMOS F140W’
    • ‘NICMOS F145M’, ‘NICMOS F160W’, ‘NICMOS F164N’, ‘NICMOS F165M’
    • ‘NICMOS F166N’, ‘NICMOS F170M’, ‘NICMOS F187N’, ‘NICMOS F190N’
    • ‘NIRC2 J’, ‘NIRC2 H’, ‘NIRC2 Kp’, ‘NIRC2 Ks’
    • ‘WIRC J’, ‘WIRC H’, ‘WIRC K’, ‘WIRC CH4S’, ‘WIRC CH4L’
    • ‘WIRC CO’, ‘WIRC PaBeta’, ‘WIRC BrGamma’, ‘WIRC Fe2’
    • ‘WISE W1’, ‘WISE W2’
Example:
>>> import splat
>>> sp = splat.getSpectrum(shortname='1555+0954')[0]
>>> print splat.estimateDistance(sp)
    Please specify the filter used to determine the apparent magnitude
    (nan, nan)
>>> print splat.estimateDistance(sp, mag = 12.521, mag_unc = 0.022, absmag = 7.24, absmag_unc = 0.50, spt = 'M3')
    (116.36999172188771, 33.124820555524224)
splat.filterInfo()
Purpose:Prints out the current list of filters in the SPLAT reference library.
splat.filterMag(sp, filter, *args, **kwargs)
Purpose:

Determine the photometric magnitude of a source based on its spectrum. Spectral fluxes are convolved with the filter profile specified by the filter input. By default this filter is also convolved with a model of Vega to extract Vega magnitudes, but the user can also specify AB magnitudes, photon flux or energy flux.

Parameters:
  • sp (required) – Spectrum class object, which should contain wave, flux and noise array elements.
  • filter (required) – String giving name of filter, which can either be one of the predefined filters listed in splat.FILTERS.keys() or a custom filter name
  • custom (optional, default = None) – A 2 x N vector array specifying the wavelengths and transmissions for a custom filter
  • notch (optional, default = None) – A 2 element array that specifies the lower and upper wavelengths for a notch filter (100% transmission within, 0% transmission without)
  • vega (optional, default = True) – compute Vega magnitudes
  • ab (optional, default = False) – compute AB magnitudes
  • energy (optional, default = False) – compute energy flux
  • photon (optional, default = False) – compute photon flux
  • filterFolder (optional, default = splat.FILTER_FOLDER) – folder containing the filter transmission files
  • vegaFile (optional, default = vega_kurucz.txt) – name of file containing Vega flux file, must be within filterFolder
  • nsamples (optional, default = 100) – number of samples to use in Monte Carlo error estimation
  • info (optional, default = False) – List the predefined filter names available
Example:
>>> import splat
>>> sp = splat.getSpectrum(shortname='1507-1627')[0]
>>> sp.fluxCalibrate('2MASS J',14.5)
>>> splat.filterMag(sp,'MKO J')
    (14.345894376898123, 0.027596454828421831)
splat.filterProperties(filter, **kwargs)
Purpose:

Returns a dictionary containing key parameters for a particular filter.

Parameters:
  • filter (required) – name of filter, must be one of the specifed filters given by splat.FILTERS.keys()
  • verbose (optional, default = True) – print out information about filter to screen
Example:
>>> import splat
>>> data = splat.filterProperties('2MASS J')
Filter 2MASS J: 2MASS J-band
Zeropoint = 1594.0 Jy
Pivot point: = 1.252 micron
FWHM = 0.323 micron
Wavelength range = 1.066 to 1.442 micron
>>> data = splat.filterProperties('2MASS X')
Filter 2MASS X not among the available filters:
  2MASS H: 2MASS H-band
  2MASS J: 2MASS J-band
  2MASS KS: 2MASS Ks-band
  BESSEL I: Bessel I-band
  FOURSTAR H: FOURSTAR H-band
  FOURSTAR H LONG: FOURSTAR H long
  FOURSTAR H SHORT: FOURSTAR H short
  ...
splat.generateMask(wave, **kwargs)
Purpose:Generates a mask array based on wavelength vector and optional inputs on what to mask.
Output:A mask array, where 0 = OK and 1 = ignore
Example:
splat.getSpectrum(*args, **kwargs)
Purpose:Gets a spectrum from the SPLAT library using various selection criteria. Calls searchLibrary to select spectra; if any found it routines an array of Spectrum objects, otherwise an empty array. See splat.searchLibrary_ for full list of search parameters.
Output:An array of Spectrum objects that satisfy the search criteria
Example:
>>> import splat
>>> sp = splat.getSpectrum(shortname='1507-1627')[0]
    Retrieving 1 file
>>> sparr = splat.getSpectrum(spt='M7')
    Retrieving 120 files
>>> sparr = splat.getSpectrum(spt='T5',young=True)
    No files match search criteria
splat.getStandard(spt, **kwargs)
Purpose:

Gets one of the pre-defined spectral standards from the SPLAT library.

Parameters:
  • spt (required) – Spectral type of standard desired, either string (‘M7’) or numberic (17)
  • sd (optional, default = False) – Set to True to get a subdwarf standard
  • esd (optional, default = False) – Set to True to get an extreme subdwarf standard
Example:
>>> import splat
>>> sp = splat.getStandard('M7')[0]
    Spectrum of VB 8
>>> sparr = splat.getStandard('T5',esd=True)
    Type esdT5.0 is not in esd standards: try one of the following:
    ['esdM5.0', 'esdM7.0', 'esdM8.5']
splat.initiateStandards(**kwargs)
Purpose:

Initiates the spectral standards in the SpeX library. By default this loads the dwarfs standards, but you can also specify loading of subdwarf and extreme subdwarf standards as well. Once loaded, these standards remain in memory.

Parameters:
  • sd (optional, default = False) – Set equal to True to load subdwarf standards
  • esd (optional, default = False) – Set equal to True to load extreme subdwarf standards
Example:
>>> import splat
>>> splat.initiateStandards()
>>> splat.SPEX_STDS['M5.0']
Spectrum of Gl51
splat.isNumber(s)
Purpose:Checks if something is a number.
Parameters:s (required) – object to be checked
Output:True or False
Example:
>>> import splat
>>> print splat.isNumber(3)
    True
>>> print splat.isNumber('hello')
    False
splat.measureEW(sp, *args, **kwargs)
Purpose:

Measures equivalent widths (EWs) of specified lines

Parameters:
  • sp – Spectrum class object, which should contain wave, flux and noise array elements
  • args – wavelength arrays. Needs at least two arrays to measure line and continuum regions.
  • nonoise (optional, default = '') –
  • line
splat.measureEWSet(sp, *args, **kwargs)
Purpose:

Measures equivalent widths (EWs) of lines from specified sets. Returns dictionary of indices.

Parameters:
  • sp – Spectrum class object, which should contain wave, flux and noise array elements
  • set (optional, default = 'rojas') –

    string defining which EW measurement set you want to use; options include:

Example:
>>> import splat
>>> sp = splat.getSpectrum(shortname='1555+0954')[0]
>>> print splat.measureEWSet(sp, set = 'rojas')
    {'Na I 2.206/2.209': (1.7484002652013144, 0.23332441577025356), 'Ca I 2.26': (1.3742491939667159, 0.24867705962337672), 'names': ['Na I 2.206/2.209', 'Ca I 2.26'], 'reference': 'EW measures from Rojas-Ayala et al. (2012)'}
splat.measureIndex(sp, *args, **kwargs)
Purpose:Measure an index on a spectrum based on defined methodology measure method can be mean, median, integrate index method can be ratio = 1/2, valley = 1-2/3, OTHERS output is index value and uncertainty
splat.measureIndexSet(sp, **kwargs)
Purpose:

Measures indices of sp from specified sets. Returns dictionary of indices.

Parameters:
Example:
>>> import splat
>>> sp = splat.getSpectrum(shortname='1555+0954')[0]
>>> print splat.measureIndexSet(sp, set = 'reid')
    {'H2O-B': (1.0531856077273236, 0.0045092074790538221), 'H2O-A': (0.89673318593633422, 0.0031278302105038594)}
splat.metallicity(sp, **kwargs)
Purpose:

Metallicity measurement using Na I and Ca I lines and H2O-K2 index as described in Rojas-Ayala et al.(2012)

Parameters:
  • sp – Spectrum class object, which should contain wave, flux and noise array elements
  • nsamples (optional, default = 100) – number of Monte Carlo samples for error computation
Example:
>>> import splat
>>> sp = splat.getSpectrum(shortname='0559-1404')[0]
>>> print splat.metallicity(sp)
    (-0.50726104530066363, 0.24844773591243882)
splat.properCoordinates(c)
Purpose:Converts various coordinate forms to the proper SkyCoord format. Convertible forms include lists and strings.
Parameters:c – coordinate to be converted. Can be a list (ra, dec) or a string.
Example:
>>> import splat
>>> print splat.properCoordinates([104.79, 25.06])
    <SkyCoord (ICRS): ra=104.79 deg, dec=25.06 deg>
>>> print splat.properCoordinates('06:59:09.60 +25:03:36.0')
    <SkyCoord (ICRS): ra=104.79 deg, dec=25.06 deg>
>>> print splat.properCoordinates('J06590960+2503360')
    <SkyCoord (ICRS): ra=104.79 deg, dec=25.06 deg>
splat.properDate(d, **kwargs)
Purpose:

Converts various date formats into a standardized date of YYYY-MM-DD

Parameters:
  • d – Date to be converted.
  • format (Optional, string) – Optional input format of the following form: * ‘YYYY-MM-DD’: e.g., 2011-04-03 (this is default output) * ‘YYYYMMDD’: e.g., 20110403 * ‘YYMMDD’: e.g., 20110403 * ‘MM/DD/YY’: e.g., 03/04/11 * ‘MM/DD/YYYY’: e.g., 03/04/2011 * ‘YYYY/MM/DD’: e.g., 2011/03/04 * ‘DD/MM/YYYY’: e.g., 04/03/2011 * ‘DD MMM YYYY’: e.g., 04 Mar 2011 * ‘YYYY MMM DD’: e.g., 2011 Mar 04
  • output (Optional, string) – Format of the output based on the prior list
Example:
>>> import splat
>>> splat.properDate('20030502')
    '2003-05-02'
>>> splat.properDate('2003/05/02')
    '02-2003-05'
>>> splat.properDate('2003/05/02',format='YYYY/MM/DD')
    '2003-05-02'
>>> splat.properDate('2003/05/02',format='YYYY/MM/DD',output='YYYY MMM DD')
    '2003 May 02'
splat.readSpectrum(*args, **kwargs)
splat.redden(sp, **kwargs)
Description:
Redden a spectrum based on an either Mie theory or a standard interstellar profile using Cardelli, Clayton, and Mathis (1989 ApJ. 345, 245)

Usage

>>> import splat
>>> sp = splat.Spectrum(10001)                   # read in a source
>>> spr = splat.redden(sp,av=5.,rv=3.2)          # redden to equivalent of AV=5
Note
This routine is still in beta form; only the CCM89 currently works
splat.test()
Purpose:

Tests the SPLAT Code

Checks the following:
 
  • If you are online and can see the SPLAT website
  • If you have access to unpublished spectra
  • If you can search for and load a spectrum
  • If searchLibrary functions properly
  • If index measurement routines functions properly
  • If classification routines function properly
  • If typeToTeff functions properly
  • If flux calibration and normalization function properly
  • If loadModel functions properly
  • If compareSpectra functions properly
  • If plotSpectrum functions properly
splat.typeToColor(spt, color, **kwargs)
Purpose:

Takes a spectral type and optionally a color (string) and returns the typical color of the source.

Parameters:
  • spt – string or integer of the spectral type
  • color (optional, default = 'J-K') – string indicating color; e.g., color=’i-z’ (note that case does not matter)
  • ref (optional, default = 'dupuy') –

    Abs Mag/SpT relation used to compute the absolute magnitude. Options are:

    • skrzypek (default): Color trends from Skryzpek et al. (2015). Spectral type range is M5 to T8 Colors include i-z, z-Y, Y-J, J-H, H-K, K-W1, W1-W2, and combinations therein.
  • nsamples (optional, default = 100) – number of Monte Carlo samples for error computation
  • unc (optional, default = 0.) – uncertainty of spt; if included, returns a tuple with color and uncertainty
  • verbose (optional, default = False) – Give feedback while in operation
Example:
>>> import splat
>>> print splat.typeToColor('L3', 'J-K')
    (1.46, nan)
>>> print splat.typeToMag('M5', 'i-z', ref = 'skrzypek', unc=0.5)
    (0.91, 0.57797809947624645)
>>> print splat.typeToMag('M0', 'i-z', ref = 'skrzypek')
    Spectral type M0.0 is outside the range for reference set Skrzypek et al. (2015)
    (nan, nan)
splat.typeToMag(spt, filt, **kwargs)
Purpose:

Takes a spectral type and a filter, and returns absolute magnitude

Parameters:
  • spt – string or integer of the spectral type
  • filter – filter of the absolute magnitude. Options are MKO K, MKO H, MKO J, MKO Y, MKO LP, 2MASS J, 2MASS K, or 2MASS H
  • nsamples (optional, default = 100) – number of Monte Carlo samples for error computation
  • unc (optional, default = 0.) – uncertainty of spt
  • ref (optional, default = 'dupuy') –

    Abs Mag/SpT relation used to compute the absolute magnitude. Options are:

    • burgasser: Abs Mag/SpT relation from Burgasser (2007). Allowed spectral type range is L0 to T8, and allowed filters are MKO K.
    • faherty: Abs Mag/SpT relation from Faherty et al. (2012). Allowed spectral type range is L0 to T8, and allowed filters are MKO J, MKO H and MKO K.
    • dupuy: Abs Mag/SpT relation from Dupuy & Liu (2012). Allowed spectral type range is M6 to T9, and allowed filters are MKO J, MKO Y, MKO H, MKO K, MKO LP, 2MASS J, 2MASS H, and 2MASS K.
    • filippazzo: Abs Mag/SpT relation from Filippazzo et al. (2015). Allowed spectral type range is M6 to T9, and allowed filters are 2MASS J and WISE W2.
Example:
>>> import splat
>>> print splat.typeToMag('L3', '2MASS J')
    (12.730064813273996, 0.4)
>>> print splat.typeToMag(21, 'MKO K', ref = 'burgasser')
    (10.705292820099999, 0.26)
>>> print splat.typeToMag(24, '2MASS J', ref = 'faherty')
    Invalid filter given for Abs Mag/SpT relation from Faherty et al. (2012)
    (nan, nan)
>>> print splat.typeToMag('M0', '2MASS H', ref = 'dupuy')
    Spectral Type is out of range for Abs Mag/SpT relation from Dupuy & Liu (2012) Abs Mag/SpT relation
    (nan, nan)
splat.typeToNum(input, **kwargs)
Purpose:

Converts between string and numeric spectral types, and vise versa.

Parameters:
  • input – Spectral type to convert. Can convert a number or a string from 0 (K0) and 49.0 (Y9).
  • error (optional, default = '') – magnitude of uncertainty. ‘:’ for uncertainty > 1 and ‘::’ for uncertainty > 2.
  • uncertainty (optional, default = 0) – uncertainty of spectral type
  • subclass (optional, default = '') –

    subclass of object. Options include:

    • sd: object is a subdwarf
    • esd: object is an extreme subdwarf
    • usd: object is an ultra subdwarf
  • lumclass (optional, default = '') – luminosity class of object represented by roman numerals
  • ageclass (optional, default = '') – age class of object
  • colorclass (optional, default = '') – color class of object
  • peculiar (optional, default = False) – if object is peculiar or not
Example:
>>> import splat
>>> print splat.typeToNum(30)
    T0.0
>>> print splat.typeToNum('T0.0')
    30.0
>>> print splat.typeToNum(27, peculiar = True, uncertainty = 1.2, lumclass = 'II')
    L7.0IIp:
>>> print splat.typeToNum(50)
    Spectral type number must be between 0 (K0) and 49.0 (Y9)
    nan
splat.typeToTeff(input, **kwargs)
Purpose:

Returns an effective temperature (Teff) and its uncertainty for a given spectral type

Parameters:
  • input – Spectral type; can be a number or a string from 0 (K0) and 49.0 (Y9).
  • uncertainty (optional, default = 0.001) – uncertainty of spectral type
  • unc (optional, default = 0.001) – same as uncertainty
  • spt_e (optional, default = 0.001) – same as uncertainty
  • ref (optional, default = 'stephens2009') –

    Teff/SpT relation used to compute the effective temperature. Options are:

    • golimowski: Teff/SpT relation from Golimowski et al. (2004). Allowed spectral type range is M6 to T8.
    • looper: Teff/SpT relation from Looper et al. (2008). Allowed spectral type range is L0 to T8.
    • stephens: Teff/SpT relation from Stephens et al. (2009). Allowed spectral type range is M6 to T8 and uses alternate coefficients for L3 to T8.
    • marocco: Teff/SpT relation from Marocco et al. (2013). Allowed spectral type range is M7 to T8.
    • filippazzo: Teff/SpT relation from Filippazzo et al. (2015). Allowed spectral type range is M6 to T9.
  • set (optional, default = 'stephens2009') – same as ref
  • method (optional, default = 'stephens2009') – same as ref
  • nsamples (optional, default = 100) – number of samples to use in Monte Carlo error estimation
Example:
>>> import splat
>>> print splat.typeToTeff(20)
    (2233.4796740905499, 100.00007874571999)
>>> print splat.typeToTeff(20, unc = 0.3, ref = 'golimowski')
    (2305.7500497902788, 127.62548366132124)
splat.weightedMeanVar(vals, winp, *args, **kwargs)
Purpose:

Computes weighted mean of an array of values through various methods. Returns weighted mean and weighted uncertainty.

Parameters:
  • vals – array of values
  • winp – array of weights associated with vals
  • method (optional, default = '') –

    input type of weights. Default is where winp is the actual weights of vals. Options include:

    • uncertainty: uncertainty weighting, where winp is the uncertainties of vals
    • ftest: ftest weighting, where winp is the chi squared values of vals
  • weight_minimum (optional, default = 0.) – minimum possible weight value
  • dof (optional, default = len(vals) - 1) – effective degrees of freedom

Note

When using ftest method, extra dof value is required

Example:
>>> import splat
>>> print splat.weightedMeanVar([3.52, 5.88, 9.03], [0.65, 0.23, 0.19])
    (5.0057009345794379, 4.3809422657000594)
>>> print splat.weightedMeanVar([3.52, 5.88, 9.03], [1.24, 2.09, 2.29], method = 'uncertainty')
    (5.0069199363443841, 4.3914329968409946)