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 62e7f0dd489a8327438d7cfb941760e7ec7be14d authored by Sudipta Basak on 15 January 2021, 22:02:56 UTC, committed by Matt Garthwaite on 25 May 2021, 03:22:21 UTC
[phase closure] recover pixels test
1 parent 60596af
  • Files
  • Changes
  • fb00022
  • /
  • 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:62e7f0dd489a8327438d7cfb941760e7ec7be14d
directory badge
swh:1:dir:7ffcf32ca21353335bee31dddef79d82933f3fe2
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