Git Product home page Git Product logo

Comments (7)

yumorishita avatar yumorishita commented on May 26, 2024

For example:

import gdal
import numpy as np

geotiff = 'date1_date2.geo.unw.tif'
data = gdal.Open(geotiff).ReadAsArray()
data[data==0] = np.nan
print('STD: {:.2f} rad'.format(np.nanstd(data)))

from licsbas.

sizzer13 avatar sizzer13 commented on May 26, 2024

from licsbas.

yumorishita avatar yumorishita commented on May 26, 2024

I see. Assuming that the std can be calculated by (1-coh**2)/(2*coh**2) (e.g., Spaans and Hooper, 2016; https://doi.org/10.1002/2015JB012752):

import gdal
import numpy as np

cc_geotiff = 'data1_data2.geo.cc.tif'
cc = gdal.Open(cc_geotiff).ReadAsArray().astype(np.float32)/255
cc[cc<0.01] = 0.01
cc[cc>0.99] = 0.99
std = np.sqrt((1-cc**2)/(2*cc**2))

from licsbas.

sizzer13 avatar sizzer13 commented on May 26, 2024

Thank you for your answer.
I'm curious about why the cc values are grouped into < 0.01 and > 0.99 ?
Besides, why the cc value divides 255, and then use the results to calculate the std? I found cc values are limited into a range of -128 to 127. It means, after dividing 255, the cc value should be in a span of -0.50196 to 0.49803. I'm not sure they should be grouped into two groups by abs(cc) < 0.01 and abs(cc) > 0.99, right?

from licsbas.

yumorishita avatar yumorishita commented on May 26, 2024

0.01 and 0.99 are just for avoiding infinity and zero division in std.

The format of cc is uint8 which ranges 0-255 (see below). Perhaps you have read the cc as int8

https://comet.nerc.ac.uk/comet-lics-portal-product-details/
“geo.cc.tif: This is the coherence image of the interferometric pair. The values varies between 0-255 in which 0 refers to the lowest coherence values and 255 indicates the highest values of coherence.”

from licsbas.

HN-Jiang avatar HN-Jiang commented on May 26, 2024

Hi, I would like to know. If I prepare the geo.cc.tif for LiCSBAS by myself (Because LiCSAR don't cover my area). I should make the cc between 0-1 or 0-255? I use cc_wave and it give me the result is between 0-1. Do I need to change it to 0-255 for LiCSBAS?
Thank you

from licsbas.

yumorishita avatar yumorishita commented on May 26, 2024

Either is fine because both formats can be handled.
https://github.com/yumorishita/LiCSBAS/blob/master/bin/LiCSBAS02_ml_prep.py#L425
https://github.com/yumorishita/LiCSBAS/blob/master/bin/LiCSBAS11_check_unw.py#L225

from licsbas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.