예제 #1
0
def plotBrightLimitInV(gBright, pdf=False, png=False):
    """
  Plot the bright limit of Gaia in V as a function of (V-I).

  Parameters
  ----------

  gBright - The bright limit of Gaia in G
  """
    vmini = np.linspace(0.0, 6.0, 1001)
    gminv = gminvFromVmini(vmini)
    vBright = gBright - gminv

    fig = plt.figure(figsize=(10, 6.5))
    plt.plot(vmini, vBright, 'b-')
    plt.xlabel('$(V-I)$')
    plt.ylabel('Bright limit of Gaia in $V$')
    plt.xlim(0, 6)
    plt.ylim(5, 11)
    plt.grid(which='both')
    plt.title("Bright limit in $G$: {0}".format(gBright))

    if (pdf):
        plt.savefig('VBandBrightLimit.pdf')
    elif (png):
        plt.savefig('VBandBrightLimit.png')
    else:
        plt.show()
예제 #2
0
def calcParallaxError(args):
  """
  Calculate the parallax error for the given input source magnitude and colour.

  :argument args: command line arguments
  """
  gmag=float(args['gmag'])
  vmini=float(args['vmini'])
  sigmaPar=parallaxErrorSkyAvg(gmag, vmini)
  gminv=gminvFromVmini(vmini)
  print("G = {0}".format(gmag))
  print("V = {0}".format(gmag-gminv))
  print("(V-I) = {0}".format(vmini))
  print("(G-V) = {0}".format(gminv))
  print("standard error = {0} muas".format(sigmaPar))
def makePlot(pdf=False, png=False):
  """
  Plot relative parallax errors as a function of distance for stars of a given spectral type.

  Parameters
  ----------

  args - command line arguments
  """
  logdistancekpc = np.linspace(-1,np.log10(20.0),100)
  sptVabsAndVmini=OrderedDict([('K0V',(5.58,0.87)), ('G5V',(4.78,0.74)), ('G0V',(4.24,0.67)),
    ('F5V',(3.50,0.50)), ('F0V',(2.98,0.38)), ('RC',(0.8,1.0))])
  lines={}

  fig=plt.figure(figsize=(10,6.5))
  currentAxis=plt.gca()

  for spt in sptVabsAndVmini.keys():
    vmag=sptVabsAndVmini[spt][0]+5.0*logdistancekpc+10.0
    indices=(vmag>14) & (vmag<16)
    gmag=vmag+gminvFromVmini(sptVabsAndVmini[spt][1])
    parerrors=parallaxErrorSkyAvg(gmag,sptVabsAndVmini[spt][1])
    relparerrors=parerrors*10**logdistancekpc/1000.0
    plt.loglog(10**logdistancekpc, relparerrors,'--k',lw=1)
    plt.loglog(10**logdistancekpc[indices], relparerrors[indices],'-',label=spt)
  plt.xlim(0.1,20.0)
  plt.ylim(0.001,0.5)
  plt.text(0.9, 0.05,'Colours indicate $14<V<16$',
     horizontalalignment='right',
     verticalalignment='bottom',
     transform = currentAxis.transAxes)
  plt.legend(loc=2)
  plt.xlabel('distance [kpc]')
  plt.ylabel('$\\sigma_\\varpi/\\varpi$')
  plt.grid(which='both')
  
  if (args['pdfOutput']):
    plt.savefig('RelativeParallaxErrorsVsDist.pdf')
  elif (args['pngOutput']):
    plt.savefig('RelativeParallaxErrorsVsDist.png')
  else:
    plt.show()
def makePlot(gmag, pdf=False, png=False, rvs=False):
  """
  Make a plot of a Mv vs (V-I) colour magnitude diagram containing lines of constant distance for stars
  at G=20. This will give an idea of the reach of Gaia.

  Parameters
  ----------

  args - command line arguments
  """
  vmini = np.linspace(-0.5,4.0,100)
  if (rvs):
    gminv = -vminGrvsFromVmini(vmini)
  else:
    gminv = gminvFromVmini(vmini)
  mvlimit100pc = gmag-5.0*np.log10(100.0)+5.0-gminv
  mvlimit1kpc = gmag-5.0*np.log10(1000.0)+5.0-gminv
  mvlimit10kpc = gmag-5.0*np.log10(10000.0)+5.0-gminv

  fig=plt.figure(figsize=(8,8))
  plt.plot(vmini,mvlimit100pc,'b')
  plt.text(vmini[50]-0.4,mvlimit100pc[50],"$d=100$ pc", horizontalalignment='right', va='top')
  plt.plot(vmini,mvlimit1kpc,'r')
  plt.text(vmini[50]-0.4,mvlimit1kpc[50],"$d=1000$ pc", horizontalalignment='right', va='top')
  plt.plot(vmini,mvlimit10kpc,'g')
  plt.text(vmini[50]-0.4,mvlimit10kpc[50],"$d=10000$ pc", horizontalalignment='right', va='top')
  ax=plt.gca()
  ax.set_ylim(ax.get_ylim()[::-1])
  plt.xlabel("$(V-I)$")
  plt.ylabel("$M_V$")
  if (rvs):
    plt.title("Distance limits for $G_\\mathrm{RVS}"+"={0}$".format(gmag))
  else:
    plt.title("Distance limits for $G={0}$".format(gmag))
  
  if (args['pdfOutput']):
    plt.savefig('GaiaSurveyLimits.pdf')
  elif (args['pngOutput']):
    plt.savefig('GaiaSurveyLimits.png')
  else:
    plt.show()
예제 #5
0
def gabsFromSpt(spt):
    """
  Obtain M_G (absolute magnitude in G-band) for the input spectral type.

  Parameters
  ----------
  
  spt - String representing the spectral type of the star.

  Returns
  -------
  
  The value of M_G.
  """
    if spt in _sptToVminiVabsDictionary:
        return vabsFromSpt(spt) + gminvFromVmini(vminiFromSpt(spt))
    else:
        message = "Unknown spectral type. Allowed values are: "
        for key in _sptToVminiVabsDictionary.keys():
            message += key + " "
        raise Exception(message)
예제 #6
0
def makePlot(args):
    """
  Make the plot with parallax horizons. The plot shows V-band magnitude vs distance for a number of
  spectral types and over the range 5.7<G<20. In addition a set of crudely drawn contours show the points
  where 0.1, 1, and 10 per cent relative parallax accracy are reached.

  Parameters
  ----------
  
  args - Command line arguments.
  """
    distances = 10.0**np.linspace(1, 6, 10001)
    av = args['extinction']
    ai = 0.479 * av  #Cardelli et al R=3.1

    spts = ['B0I', 'B1V', 'G2V', 'K4V', 'M0V', 'M6V', 'K1III', 'M0III']
    pointOnePercD = []
    pointOnePercV = []
    onePercD = []
    onePercV = []
    tenPercD = []
    tenPercV = []
    vabsPointOnePerc = []
    vabsOnePerc = []
    vabsTenPerc = []

    fig = plt.figure(figsize=(11, 7.8))
    deltaHue = 240.0 / (len(spts) - 1)
    hues = (240.0 - np.arange(len(spts)) * deltaHue) / 360.0
    hsv = np.zeros((1, 1, 3))
    hsv[0, 0, 1] = 1.0
    hsv[0, 0, 2] = 0.9
    for hue, spt in zip(hues, spts):
        hsv[0, 0, 0] = hue
        vmags = vabsFromSpt(spt) + 5.0 * np.log10(distances) - 5.0 + av
        vmini = vminiFromSpt(spt) + av - ai
        #gmags = gabsFromSpt(spt)+5.0*np.log10(distances)-5.0
        gmags = vmags + gminvFromVmini(vmini)
        relParErr = parallaxErrorSkyAvg(gmags, vmini) * distances / 1.0e6
        observed = (gmags >= 5.7) & (gmags <= 20.0)
        relParErrObs = relParErr[observed]
        # Identify the points where the relative parallax accuracy is 0.1, 1, or 10 per cent.
        if (relParErrObs.min() < 0.001):
            index = len(relParErrObs[relParErrObs <= 0.001]) - 1
            pointOnePercD.append(distances[observed][index])
            pointOnePercV.append(vmags[observed][index])
            vabsPointOnePerc.append(vabsFromSpt(spt))
        if (relParErrObs.min() < 0.01):
            index = len(relParErrObs[relParErrObs <= 0.01]) - 1
            onePercD.append(distances[observed][index])
            onePercV.append(vmags[observed][index])
            vabsOnePerc.append(vabsFromSpt(spt))
        if (relParErrObs.min() < 0.1):
            index = len(relParErrObs[relParErrObs <= 0.1]) - 1
            tenPercD.append(distances[observed][index])
            tenPercV.append(vmags[observed][index])
            vabsTenPerc.append(vabsFromSpt(spt))
        plt.semilogx(distances[observed],
                     vmags[observed],
                     '-',
                     label=spt,
                     color=hsv_to_rgb(hsv)[0, 0, :])
        if (spt == 'B0I'):
            plt.text(distances[observed][-1] - 1.0e5,
                     vmags[observed][-1],
                     spt,
                     horizontalalignment='right',
                     verticalalignment='bottom',
                     fontsize=14)
        else:
            plt.text(distances[observed][-1],
                     vmags[observed][-1],
                     spt,
                     horizontalalignment='center',
                     verticalalignment='bottom',
                     fontsize=14)

    # Draw the "contours" of constant relative parallax accuracy.
    pointOnePercD = np.array(pointOnePercD)
    pointOnePercV = np.array(pointOnePercV)
    indices = np.argsort(vabsPointOnePerc)
    plt.semilogx(pointOnePercD[indices], pointOnePercV[indices], 'k--')
    plt.text(pointOnePercD[indices][-1] * 1.2,
             pointOnePercV[indices][-1] - 2.5,
             "$0.1$\\%",
             ha='right',
             size=16,
             bbox=dict(
                 boxstyle="round, pad=0.3",
                 ec=(0.0, 0.0, 0.0),
                 fc=(1.0, 1.0, 1.0),
             ))

    onePercD = np.array(onePercD)
    onePercV = np.array(onePercV)
    indices = np.argsort(vabsOnePerc)
    plt.semilogx(onePercD[indices], onePercV[indices], 'k--')
    plt.text(onePercD[indices][-1] * 1.2,
             onePercV[indices][-1] - 2.5,
             "$1$\\%",
             ha='right',
             size=16,
             bbox=dict(
                 boxstyle="round, pad=0.3",
                 ec=(0.0, 0.0, 0.0),
                 fc=(1.0, 1.0, 1.0),
             ))

    tenPercD = np.array(tenPercD)
    tenPercV = np.array(tenPercV)
    indices = np.argsort(vabsTenPerc)
    plt.semilogx(tenPercD[indices], tenPercV[indices], 'k--')
    plt.text(tenPercD[indices][-1] * 1.5,
             tenPercV[indices][-1] - 2.5,
             "$10$\\%",
             ha='right',
             size=16,
             bbox=dict(
                 boxstyle="round, pad=0.3",
                 ec=(0.0, 0.0, 0.0),
                 fc=(1.0, 1.0, 1.0),
             ))

    plt.title('Parallax relative accuracy horizons ($A_V={0}$)'.format(av))

    plt.xlabel('Distance [pc]')
    plt.ylabel('V')
    plt.grid()
    #leg=plt.legend(loc=4, fontsize=14, labelspacing=0.5)
    plt.ylim(5, 26)

    basename = 'ParallaxHorizons'
    if (args['pdfOutput']):
        plt.savefig(basename + '.pdf')
    elif (args['pngOutput']):
        plt.savefig(basename + '.png')
    else:
        plt.show()
예제 #7
0
def makePlot(args):
    """
  Make the plot with photometry performance predictions.

  :argument args: command line arguments
  """
    gmag = np.linspace(3.0, 20.0, 171)

    vmini = args['vmini']

    vmag = gmag - gminvFromVmini(vmini)

    if args['eom']:
        sigmaG = gMagnitudeErrorEoM(gmag)
        sigmaGBp = bpMagnitudeErrorEoM(gmag, vmini)
        sigmaGRp = rpMagnitudeErrorEoM(gmag, vmini)
        yminmax = (1.0 - 4, 0.1)
    else:
        sigmaG = gMagnitudeError(gmag)
        sigmaGBp = bpMagnitudeError(gmag, vmini)
        sigmaGRp = rpMagnitudeError(gmag, vmini)
        yminmax = (1.0 - 4, 1)

    fig = plt.figure(figsize=(10, 6.5))

    if (args['vmagAbscissa']):
        plt.semilogy(vmag, sigmaG, 'k', label='$\\sigma_G$')
        plt.semilogy(vmag,
                     sigmaGBp,
                     'b',
                     label='$\\sigma_{G_\\mathrm{BP}}$' +
                     ' for $(V-I)={0}$'.format(vmini))
        plt.semilogy(vmag,
                     sigmaGRp,
                     'r',
                     label='$\\sigma_{G_\\mathrm{RP}}$' +
                     ' for $(V-I)={0}$'.format(vmini))
        plt.xlim((6, 20))
        #plt.ylim(yminmax)
        plt.legend(loc=0)
        plt.xlabel('$V$ [mag]')
    else:
        ax = fig.add_subplot(111)
        plt.semilogy(gmag, sigmaG, 'k', label='$\\sigma_G$')
        plt.semilogy(gmag,
                     sigmaGBp,
                     'b',
                     label='$\\sigma_{G_\\mathrm{BP}}$' +
                     ' for $(V-I)={0}$'.format(vmini))
        plt.semilogy(gmag,
                     sigmaGRp,
                     'r',
                     label='$\\sigma_{G_\\mathrm{RP}}$' +
                     ' for $(V-I)={0}$'.format(vmini))
        plt.xlim((6, 20))
        #plt.ylim(yminmax)
        plt.legend(loc=0)
        plt.xlabel('$G$ [mag]')

    plt.xticks(np.arange(6, 20, 2))
    ax = plt.gca().yaxis
    #ax.set_major_formatter(matplotlib.ticker.ScalarFormatter())
    #plt.ticklabel_format(axis='y',style='plain')
    plt.grid(which='both')
    plt.ylabel('Photometric error [mag]')
    if args['eom']:
        plt.title(
            'End-of-mission mean photometry: sky averaged errors for $(V-I)={0}$'
            .format(vmini),
            fontsize=14)
    else:
        plt.title(
            'Single-FoV-transit photometry: sky averaged errors for $(V-I)={0}$'
            .format(vmini),
            fontsize=14)

    basename = 'PhotometricErrors'
    if (args['pdfOutput']):
        plt.savefig(basename + '.pdf')
    elif (args['pngOutput']):
        plt.savefig(basename + '.png')
    else:
        plt.show()
예제 #8
0
def makePlot(args):
    """
  Make the plot with parallax performance predictions.

  :argument args: command line arguments
  """
    gmag = np.linspace(5.7, 20.0, 101)

    vminiB1V = vminiFromSpt('B1V')
    vminiG2V = vminiFromSpt('G2V')
    vminiM6V = vminiFromSpt('M6V')

    vmagB1V = gmag - gminvFromVmini(vminiB1V)
    vmagG2V = gmag - gminvFromVmini(vminiG2V)
    vmagM6V = gmag - gminvFromVmini(vminiM6V)

    sigparB1V = parallaxErrorSkyAvg(gmag, vminiB1V)
    sigparB1Vmin = parallaxMinError(gmag, vminiB1V)
    sigparB1Vmax = parallaxMaxError(gmag, vminiB1V)

    sigparG2V = parallaxErrorSkyAvg(gmag, vminiG2V)
    sigparG2Vmin = parallaxMinError(gmag, vminiG2V)
    sigparG2Vmax = parallaxMaxError(gmag, vminiG2V)

    sigparM6V = parallaxErrorSkyAvg(gmag, vminiM6V)
    sigparM6Vmin = parallaxMinError(gmag, vminiM6V)
    sigparM6Vmax = parallaxMaxError(gmag, vminiM6V)

    fig = plt.figure(figsize=(10, 6.5))

    if (args['gmagAbscissa']):
        plt.semilogy(gmag, sigparB1V, 'b', label='B1V')
        plt.semilogy(gmag, sigparG2V, 'g', label='G2V')
        plt.semilogy(gmag, sigparM6V, 'r', label='M6V')
        plt.xlim((5, 20))
        plt.ylim((4, 1000))
        plt.legend(loc=4)
        plt.xlabel('$G$ [mag]')
    else:
        ax = fig.add_subplot(111)
        plt.semilogy(vmagB1V, sigparB1V, 'b', label='B1V')
        #plt.semilogy(vmagG2V, sigparG2V, 'g', label='G2V')
        plt.semilogy(vmagM6V, sigparM6V, 'r', label='M6V')
        plt.fill_between(vmagB1V,
                         sigparB1Vmin,
                         sigparB1Vmax,
                         color='b',
                         alpha=0.3)
        plt.fill_between(vmagM6V,
                         sigparM6Vmin,
                         sigparM6Vmax,
                         color='r',
                         alpha=0.3)
        plt.xlim((5, 22.5))
        plt.ylim((4, 1000))
        plt.text(17.2, 190, 'B1V', color='b')
        plt.text(18, 20, 'M6V', color='r')
        plt.xlabel('$V$ [mag]')
        plt.text(7,
                 17,
                 'calibration noise floor',
                 size=12,
                 bbox=dict(
                     boxstyle="round,pad=0.3",
                     ec=(0.0, 0.0, 0.0),
                     fc=(1.0, 1.0, 1.0),
                 ))
        plt.text(14.75,
                 80,
                 'photon noise',
                 rotation=45,
                 size=12,
                 bbox=dict(
                     boxstyle="round,pad=0.3",
                     ec=(0.0, 0.0, 0.0),
                     fc=(1.0, 1.0, 1.0),
                 ))
        ax.annotate(
            'non-uniformity\nover the sky',
            xy=(21.5, 320),
            xycoords='data',
            xytext=(21.5, 80),
            textcoords='data',
            ha='center',
            size='12',
            bbox=dict(boxstyle="round,pad=0.3", ec=(0, 0, 0), fc=(1, 1, 1)),
            arrowprops=dict(facecolor='black',
                            shrink=0.15,
                            width=1,
                            headwidth=6),
            horizontalalignment='right',
            verticalalignment='top',
        )
        ax.annotate(
            '',
            xy=(21.5, 500),
            xycoords='data',
            xytext=(21.5, 950),
            textcoords='data',
            ha='center',
            size='12',
            arrowprops=dict(facecolor='black',
                            shrink=0.15,
                            width=1,
                            headwidth=6),
            horizontalalignment='right',
            verticalalignment='bottom',
        )

    plt.xticks(np.arange(6, 24, 2))
    ax = plt.gca().yaxis
    ax.set_major_formatter(matplotlib.ticker.ScalarFormatter())
    plt.ticklabel_format(axis='y', style='plain')
    plt.grid(which='both')
    plt.ylabel('End-of-mission parallax standard error [$\mu$as]')

    if (args['pdfOutput']):
        plt.savefig('ParallaxErrors.pdf')
    elif (args['pngOutput']):
        plt.savefig('ParallaxErrors.png')
    else:
        plt.show()
def makePlot(args):
    """
  Make the plot with proper motion performance predictions. The predictions are for the TOTAL proper
  motion under the assumption of equal components mu_alpha* and mu_delta.

  :argument args: command line arguments
  """
    gmag = np.linspace(5.7, 20.0, 101)

    vminiB1V = vminiFromSpt('B1V')
    vminiG2V = vminiFromSpt('G2V')
    vminiM6V = vminiFromSpt('M6V')

    vmagB1V = gmag - gminvFromVmini(vminiB1V)
    vmagG2V = gmag - gminvFromVmini(vminiG2V)
    vmagM6V = gmag - gminvFromVmini(vminiM6V)

    sigmualphaB1V, sigmudeltaB1V = properMotionErrorSkyAvg(gmag, vminiB1V)
    sigmuB1V = np.sqrt(0.5 * sigmualphaB1V**2 + 0.5 * sigmudeltaB1V**2)
    sigmualphaB1V, sigmudeltaB1V = properMotionMinError(gmag, vminiB1V)
    sigmuB1Vmin = np.sqrt(0.5 * sigmualphaB1V**2 + 0.5 * sigmudeltaB1V**2)
    sigmualphaB1V, sigmudeltaB1V = properMotionMaxError(gmag, vminiB1V)
    sigmuB1Vmax = np.sqrt(0.5 * sigmualphaB1V**2 + 0.5 * sigmudeltaB1V**2)

    sigmualphaG2V, sigmudeltaG2V = properMotionErrorSkyAvg(gmag, vminiG2V)
    sigmuG2V = np.sqrt(0.5 * sigmualphaG2V**2 + 0.5 * sigmudeltaG2V**2)
    sigmualphaG2V, sigmudeltaG2V = properMotionMinError(gmag, vminiG2V)
    sigmuG2Vmin = np.sqrt(0.5 * sigmualphaG2V**2 + 0.5 * sigmudeltaG2V**2)
    sigmualphaG2V, sigmudeltaG2V = properMotionMaxError(gmag, vminiG2V)
    sigmuG2Vmax = np.sqrt(0.5 * sigmualphaG2V**2 + 0.5 * sigmudeltaG2V**2)

    sigmualphaM6V, sigmudeltaM6V = properMotionErrorSkyAvg(gmag, vminiM6V)
    sigmuM6V = np.sqrt(0.5 * sigmualphaM6V**2 + 0.5 * sigmudeltaM6V**2)
    sigmualphaM6V, sigmudeltaM6V = properMotionMinError(gmag, vminiM6V)
    sigmuM6Vmin = np.sqrt(0.5 * sigmualphaM6V**2 + 0.5 * sigmudeltaM6V**2)
    sigmualphaM6V, sigmudeltaM6V = properMotionMaxError(gmag, vminiM6V)
    sigmuM6Vmax = np.sqrt(0.5 * sigmualphaM6V**2 + 0.5 * sigmudeltaM6V**2)

    fig = plt.figure(figsize=(10, 6.5))

    if (args['gmagAbscissa']):
        plt.semilogy(gmag, sigmuB1V, 'b', label='B1V')
        plt.semilogy(gmag, sigmuG2V, 'g', label='G2V')
        plt.semilogy(gmag, sigmuM6V, 'r', label='M6V')
        plt.xlim((5, 20))
        plt.ylim((1, 500))
        plt.legend(loc=4)
    else:
        ax = fig.add_subplot(111)
        plt.semilogy(vmagB1V, sigmuB1V, 'b', label='B1V')
        #plt.semilogy(vmagG2V, sigmuG2V, 'g', label='G2V')
        plt.semilogy(vmagM6V, sigmuM6V, 'r', label='M6V')
        plt.fill_between(vmagB1V,
                         sigmuB1Vmin,
                         sigmuB1Vmax,
                         color='b',
                         alpha=0.3)
        plt.fill_between(vmagM6V,
                         sigmuM6Vmin,
                         sigmuM6Vmax,
                         color='r',
                         alpha=0.3)
        plt.xlim((5, 22.5))
        plt.ylim((1, 500))
        plt.text(17.5, 100, 'B1V', color='b')
        plt.text(18, 10, 'M6V', color='r')
        plt.text(7,
                 11,
                 'calibration noise floor',
                 size=12,
                 bbox=dict(
                     boxstyle="round,pad=0.3",
                     ec=(0.0, 0.0, 0.0),
                     fc=(1.0, 1.0, 1.0),
                 ))
        plt.text(14.75,
                 50,
                 'photon noise',
                 rotation=45,
                 size=12,
                 bbox=dict(
                     boxstyle="round,pad=0.3",
                     ec=(0.0, 0.0, 0.0),
                     fc=(1.0, 1.0, 1.0),
                 ))
        ax.annotate(
            'non-uniformity\nover the sky',
            xy=(21.5, 80),
            xycoords='data',
            xytext=(21.5, 30),
            textcoords='data',
            ha='center',
            size='12',
            bbox=dict(boxstyle="round,pad=0.3", ec=(0, 0, 0), fc=(1, 1, 1)),
            arrowprops=dict(facecolor='black',
                            shrink=0.15,
                            width=1,
                            headwidth=6),
            horizontalalignment='right',
            verticalalignment='top',
        )
        ax.annotate(
            '',
            xy=(21.5, 170),
            xycoords='data',
            xytext=(21.5, 380),
            textcoords='data',
            ha='center',
            size='12',
            arrowprops=dict(facecolor='black',
                            shrink=0.15,
                            width=1,
                            headwidth=6),
            horizontalalignment='right',
            verticalalignment='bottom',
        )

    plt.xticks(np.arange(6, 24, 2))
    ax = plt.gca().yaxis
    ax.set_major_formatter(matplotlib.ticker.ScalarFormatter())
    plt.ticklabel_format(axis='y', style='plain')
    plt.grid(which='both')
    plt.xlabel('$V$ [mag]')
    plt.ylabel('End-of-mission $\\sigma_\\mu$ [$\mu$as/yr]')

    basename = 'ProperMotionErrors'
    if (args['pdfOutput']):
        plt.savefig(basename + '.pdf')
    elif (args['pngOutput']):
        plt.savefig(basename + '.png')
    else:
        plt.show()