Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 896ea36fe255f490725df03742096ed90314daca authored by Sean on 02 March 2022, 03:23:43 UTC, committed by Sean on 02 March 2022, 03:23:43 UTC
removed use of recommonmark due to previously identified conflicts
1 parent 9722bdd
  • Files
  • Changes
  • 5c4656f
  • /
  • scripts
  • /
  • prepifg.sh
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:896ea36fe255f490725df03742096ed90314daca
directory badge
swh:1:dir:cf98beb6a2d944575a5967c539e68e696df95e69
content badge
swh:1:cnt:faa33580d96e8442450e579cb9fd37cb19a3f7c9

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
prepifg.sh
#!/usr/bin/env bash
# inputs are extents, thresh, coherence file, coherence_threshold
# coherence masking
# gdal average
# gdal average has two steps
# create a raster with the input raster nan_matrix, then compute the nan_frac of the input raster
# take average of the input raster, and set nan_frac > thresh = nan

inputdir=/home/sudipta/repos/PyRate/out/gamma/out
outdir_crop=/home/sudipta/repos/PyRate/out/gamma/out/cropped
outdir_coh=/home/sudipta/repos/PyRate/out/gamma/out/coherence

mkdir -p ${outdir_crop}
mkdir -p ${outdir_coh}

function crop_resample_average {
    f=$1
    echo ${f}
    gdalwarp -overwrite ${f}
}

function nan_matrix {
    f=$1
    echo ${f}
    python gdal_calc_local.py --overwrite ${f}
}

function resampled_average {
    f=$1
    echo ${f}
    python gdal_calc_local.py --overwrite ${f}
}

export -f crop_resample_average
#export -f mask
#export -f multilook
export -f nan_matrix
export -f resampled_average

#ls ${inputdir}/*.tif | parallel crop ${outdir_crop}

# while IFS= read -r lineA && IFS= read -r lineB <&3; do
#  echo "$lineA"; echo "$lineB"
# done <fileA 3<fileB


# outfile.txt is tab/space delimited file with `ifg - coh mask` pairs in each line

# 1. apply coh mask at the very beginning
#cat mask.txt | parallel mask

# 2. crop, average, resample
#cat crop.txt | parallel crop_resample_average

# 3. create nan fractions
#cat nan_fraction.txt | parallel nan_matrix

# 4. crop average resample nan fractions
# cat crop_average_nan_fraction.txt | parallel crop_resample_average

# 5. now resampled
# cat resampled_average.txt | parallel resampled_average

The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API