question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Documentation Guide

See original GitHub issue

We should make a documentation guide for functions and classes. Because in many cases I do not have a clue which input type is required (str, tuple, list, class instance etc.). I tried to update the geocode function in snap but I am not sure if the required input types are correct:

def geocode(infile, outdir, t_srs=None, tr=20, polarizations='all', shapefile=None, scaling='dB',
            geocoding_type='Range-Doppler', removeS1BoderNoise=True, offset=None, externalDEMFile=None, externalDEMNoDataValue=None, externalDEMApplyEGM=True, test=False):
    """
    wrapper function for geocoding SAR images using ESA SNAP

    Parameters
    ----------
    infile: str or pyroSAR.ID class instance
        A pyroSAR.ID object or a file/folder name of a SAR scene
    outdir: str
        the directory to write the final files to
    t_srs: str or None, optional
        a target geographic reference system (a string in WKT or PROJ4 format or a EPSG identifier number)
    tr: int or float
        the target resolution in meters
    polarizations: list or {'VV', 'HH', 'VH', 'HV', 'all'}, optional
        The polarizations to be processed; can be a string for a single polarization e.g. 'VV' or a list of several polarizations e.g. ['VV', 'VH']
    shapefile: ???
        A vector file for subsetting the SAR scene to a test site
    scaling: {'dB', 'db', 'linear'}, optional
        should the output be in linear of decibel scaling? Input can be single strings e.g. 'dB' or a list of both: ['linear', 'dB']
    geocoding_type: str, optional
        The type of geocoding applied; can be either 'Range-Doppler' or 'SAR simulation cross correlation'
    removeS1BoderNoise: bool
        Enables removal of S1 GRD border noise
    offset: tuple
    A tuple defining offsets for left, right, top and bottom in pixels, e.g. (100, 100, 0, 0); this variable is overridden if a shapefile is defined
    externalDEMFile: str or None, optional
        The absolute path to an external DEM file
    externalDEMNoDataValue: int or float
        The no data value of the external DEM. If not specified the function will try to read it from the specified external DEM.
    externalDEMApplyEGM: bool, optional
        Apply Earth Gravitational Model to external DEM?
    test: bool, optional
        If set to True the workflow xml file is only written and not executed

    Note
    ----
    If only one polarization is selected the results are directly written to GeoTiff.
    Otherwise the results are first written to a folder containing ENVI files and then transformed to GeoTiff files (one for each polarization)
    If GeoTiff would directly be selected as output format for multiple polarizations then a multilayer GeoTiff
    is written by SNAP which is considered an unfavorable format

    See Also
    --------
    pyroSAR.ID
    """

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
johntruckenbrodtcommented, Apr 4, 2018

great! Thanks Ismail.

1reaction
johntruckenbrodtcommented, Apr 4, 2018

Oh and whilst your at it, can you please remove the option to provide a list as input to parameter scaling. This is indeed not supported by the source code. My bad.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation Guide - Write the Docs
This guide gathers the collective wisdom of the Write the Docs community around best practices for creating ... A beginner's guide to writing...
Read more >
How to Build the Best User Documentation (New Guide) | Blog
User documentation (also called end user manuals, end user guides, instruction manuals, etc.) is the content you provide end users with to help...
Read more >
How to Write a Good Documentation: Home
This guide will help you to prepare your code for publishing through writing a good documentation. Documentation.
Read more >
API Documentation Guide and Best Practices - Stoplight
In this API documentation guide, we'll cover the basics of how to document APIs and different types of documentation. We will also cover...
Read more >
Documentation System
Find the software documentation system for Divio. Includes comprehensive tutorials, how-to guides, technical reference and explanation. Learn more here.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found