Пример #1
0
def main(infile, outfile, chla_global):
    """This is a command line program for quickly getting the depth and bottom reflectance (Rb)
     for an input surface reflectance image.  You must supply the Chl-a concentration.
  """

    if not os.path.isfile(infile):
        print('File: %s does not exist' % (infile))
        sys.exit()

    depthfile = '/data/gdcsdata/Research/Researcher/Knapp/Moorea_Weekly/depth/' + os.path.splitext(
        os.path.basename(infile))[0] + '_depth.tif'
    #depthfile = '/data/gdcsdata/Research/Researcher/Knapp/Moorea_Weekly/depth/moorea_depth.vrt'
    #rbfile = os.path.splitext(infile)[0] + "_rb.tif"
    rbfile = outfile

    #try:
    #  depth(infile, chla_global, depthfile, None)
    #except:
    #  print("Error: Could not create Depth data.")

    print(("Processed Depth: %s") % (depthfile))

    if (os.path.isfile(depthfile)):
        try:
            rb(infile, chla_global, depthfile, rbfile, None)
        except:
            print("Error: Could not create Rb data.")
    else:
        print((
            "Error: Could not find depth data file %s, so could not do bottom reflectance."
        ) % (depthfile))

    print(("Processed Rb: %s") % (rbfile))
Пример #2
0
def main(infile, outfile, chla_global):
  """This is a command line program for quickly getting the depth and bottom reflectance (Rb)
     for an input surface reflectance image.  You must supply the Chl-a concentration.
  """ 

  depthfile = '/data/gdcsdata/Research/Researcher/Knapp/Hawaii_Weekly/AscendingDescending/depth_ll/eastern_hawaii_sentinel2.tif'
  ## depthfile = 'depth_ll/depth_3857_me.vrt'
  #rbfile = os.path.splitext(infile)[0] + "_rb.tif"
  rbfile = outfile

  #try:
  #  depth(infile, chla_global, depthfile, None)
  #except:
  #  print("Error: Could not create Depth data.")

  print(("Processed Depth: %s") % (depthfile))

  if (os.path.isfile(depthfile)):
    try:
      rb(infile, chla_global, depthfile, rbfile, None)
    except:
      print("Error: Could not create Rb data.")
  else:
    print(("Error: Could not find depth data file %s, so could not do bottom reflectance.") % (depthfile))

  print(("Processed Rb: %s") % (rbfile))
Пример #3
0
def main(infile, outfile, chla_global):
    """This is a command line program for quickly getting the depth and bottom reflectance (Rb)
     for an input surface reflectance image.  You must supply the Chl-a concentration.
  """

    #depthfile = os.path.splitext(infile)[0] + "_depth.tif"
    ## depthfile = '/data/gdcsdata/Research/Researcher/Knapp/Yaping_stuff/Xu/GBR_Weekly/depth/'+os.path.basename(os.path.splitext(infile)[0])[0:15]+'_depth.tif'
    depthfile = '/scratch/dknapp4/GBR/depth/' + os.path.basename(
        os.path.splitext(infile)[0])[0:15] + '_depth.tif'
    #rbfile = os.path.splitext(infile)[0] + "_rb.tif"
    rbfile = outfile

    #try:
    #  depth(infile, chla_global, depthfile, None)
    #except:
    #  print("Error: Could not create Depth data.")

    print(("Processed Depth: %s") % (depthfile))

    if (os.path.isfile(depthfile)):
        try:
            rb(infile, chla_global, depthfile, rbfile, None)
        except:
            print("Error: Could not create Rb data.")
    else:
        print((
            "Error: Could not find depth data file %s, so could not do bottom reflectance."
        ) % (depthfile))

    print(("Processed Rb: %s") % (rbfile))
Пример #4
0
def main(infile, outfile, depthfile, chla_global):
    rbfile = outfile

    print(("Input Depth: %s") % (depthfile))

    if (os.path.isfile(depthfile)):
        try:
            rb(infile, chla_global, depthfile, rbfile, None)
        except:
            print("Error: Could not create Rb data.")
    else:
        print((
            "Error: Could not find depth data file %s, so could not do bottom reflectance."
        ) % (depthfile))

    print(("Processed Rb: %s") % (rbfile))
Пример #5
0
def main(infile, outfile, chla_global):
    """This is a command line program for quickly getting calculating bottom reflectance (Rb)
     for an input surface reflectance image.  You must supply the Chl-a concentration and the Depth.
  """

    #depthfile = os.path.splitext(infile)[0] + "_depth.tif"
    depthfile = 'depth_ll/depth_3857_me.vrt'
    #rbfile = os.path.splitext(infile)[0] + "_rb.tif"
    rbfile = outfile

    print(("Processed Depth: %s") % (depthfile))

    if (os.path.isfile(depthfile)):
        try:
            rb(infile, chla_global, depthfile, rbfile, None)
        except:
            print("Error: Could not create Rb data.")
    else:
        print((
            "Error: Could not find depth data file %s, so could not do bottom reflectance."
        ) % (depthfile))

    print(("Processed Rb: %s") % (rbfile))