Git Product home page Git Product logo

opensarlab-notebooks's People

Contributors

alex-lewandowski avatar asjohnston-asf avatar dgpalmieri avatar ejfielding avatar emlundell avatar fjmeyer avatar jhkennedy avatar khogenso avatar piyushrpt avatar ruikawahara avatar teresa-fitzmayer avatar testern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opensarlab-notebooks's Issues

Error encountered in Hazards/SARChangeDetectionMethods_From_Prepared_Data_Stack.ipynb

I was working through the Hazards/SARChangeDetectionMethods_From_Prepared_Data_Stack.ipynb notebook, which is based on data from the Exercise4A-SARChangeDetectionMethods.ipynb notebook.

At step 4. Create a Pandas Time Index and Display the VRT Band Dates, I encountered the following while running cell 14:

Create an index of timedelta64 data with Pandas:
tindex = pd.DatetimeIndex(dates)
tindex = pd.DatetimeIndex(dates)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
~/.local/envs/rtc_analysis/lib/python3.9/site-packages/pandas/core/arrays/datetimes.py in objects_to_datetime64ns(data, dayfirst, yearfirst, utc, errors, require_iso8601, allow_object)
   2084         try:
-> 2085             values, tz_parsed = conversion.datetime_to_datetime64(data)
   2086             # If tzaware, these values represent unix timestamps, so we

pandas/_libs/tslibs/conversion.pyx in pandas._libs.tslibs.conversion.datetime_to_datetime64()

TypeError: Unrecognized value type: <class 'str'>

During handling of the above exception, another exception occurred:

ParserError                               Traceback (most recent call last)
<ipython-input-14-3b54fb0f6ce4> in <module>
----> 1 tindex = pd.DatetimeIndex(dates)

~/.local/envs/rtc_analysis/lib/python3.9/site-packages/pandas/core/indexes/datetimes.py in __new__(cls, data, freq, tz, normalize, closed, ambiguous, dayfirst, yearfirst, dtype, copy, name)
    305         name = maybe_extract_name(name, data, cls)
    306 
--> 307         dtarr = DatetimeArray._from_sequence_not_strict(
    308             data,
    309             dtype=dtype,

~/.local/envs/rtc_analysis/lib/python3.9/site-packages/pandas/core/arrays/datetimes.py in _from_sequence_not_strict(cls, data, dtype, copy, tz, freq, dayfirst, yearfirst, ambiguous)
    324         freq, freq_infer = dtl.maybe_infer_freq(freq)
    325 
--> 326         subarr, tz, inferred_freq = sequence_to_dt64ns(
    327             data,
    328             dtype=dtype,

~/.local/envs/rtc_analysis/lib/python3.9/site-packages/pandas/core/arrays/datetimes.py in sequence_to_dt64ns(data, dtype, copy, tz, dayfirst, yearfirst, ambiguous)
   1971             # data comes back here as either i8 to denote UTC timestamps
   1972             #  or M8[ns] to denote wall times
-> 1973             data, inferred_tz = objects_to_datetime64ns(
   1974                 data, dayfirst=dayfirst, yearfirst=yearfirst
   1975             )

~/.local/envs/rtc_analysis/lib/python3.9/site-packages/pandas/core/arrays/datetimes.py in objects_to_datetime64ns(data, dayfirst, yearfirst, utc, errors, require_iso8601, allow_object)
   2088             return values.view("i8"), tz_parsed
   2089         except (ValueError, TypeError):
-> 2090             raise e
   2091 
   2092     if tz_parsed is not None:

~/.local/envs/rtc_analysis/lib/python3.9/site-packages/pandas/core/arrays/datetimes.py in objects_to_datetime64ns(data, dayfirst, yearfirst, utc, errors, require_iso8601, allow_object)
   2073 
   2074     try:
-> 2075         result, tz_parsed = tslib.array_to_datetime(
   2076             data,
   2077             errors=errors,

pandas/_libs/tslib.pyx in pandas._libs.tslib.array_to_datetime()

pandas/_libs/tslib.pyx in pandas._libs.tslib.array_to_datetime()

pandas/_libs/tslib.pyx in pandas._libs.tslib.array_to_datetime_object()

pandas/_libs/tslib.pyx in pandas._libs.tslib.array_to_datetime_object()

pandas/_libs/tslibs/parsing.pyx in pandas._libs.tslibs.parsing.parse_datetime_string()

~/.local/envs/rtc_analysis/lib/python3.9/site-packages/dateutil/parser/_parser.py in parse(timestr, parserinfo, **kwargs)
   1372         return parser(parserinfo).parse(timestr, **kwargs)
   1373     else:
-> 1374         return DEFAULTPARSER.parse(timestr, **kwargs)
   1375 
   1376 

~/.local/envs/rtc_analysis/lib/python3.9/site-packages/dateutil/parser/_parser.py in parse(self, timestr, default, ignoretz, tzinfos, **kwargs)
    647 
    648         if res is None:
--> 649             raise ParserError("Unknown string format: %s", timestr)
    650 
    651         if len(res) == 0:

ParserError: Unknown string format: _2018010

product type is not defined

Hi @Alex-Lewandowski
When I am trying to run this cell in Jupyter Notebook, I get this error. Previously, I did not receive such a error during the InASR time series processing time, but suddenly I got this error. Please look into it and thank you for your time and consideration.

image

In Alaska Vertex, I have this project. But it is not showing in Jupyter Notebook.
image

Lab2-SurfaceWaterExtentMapping.ipynb - ValueError: output array is read-only

Hello,

I ran the Lab2-SurfaceWaterExtentMapping.ipynb with the 'do_PP = True' (cell 38) to enable the Fuzzy logic post-processing. However, there was an error message in cell 39 saying that 'ValueError: output array is read-only. The log messages are below here. Did I do something that I am not supposed to do?

Thank you.


/home/jovyan/.local/envs/hydrosar/lib/python3.9/site-packages/numpy/lib/function_base.py:4691: UserWarning: Warning: 'partition' will ignore the 'mask' of the MaskedArray.
arr.partition(

ValueError Traceback (most recent call last)
Cell In [40], line 109
107 ## HAND upper and lower fuzzy threshold calculation
108 maskedarray = np.ma.masked_where(maskimage==0, hand_interp)
--> 109 ma2 = np.ma.masked_where(maskedarray > np.percentile(maskedarray, 90), maskedarray)
110 hand_lowerlimit = np.ma.median(np.ma.masked_invalid(ma2))
111 hand_upperlimit = hand_lowerlimit + (np.ma.std(np.ma.masked_invalid(ma2)) + 3.5)*np.ma.std(np.ma.masked_invalid(ma2))

File <array_function internals>:180, in percentile(*args, **kwargs)

File ~/.local/envs/hydrosar/lib/python3.9/site-packages/numpy/lib/function_base.py:4166, in percentile(a, q, axis, out, overwrite_input, method, keepdims, interpolation)
4164 if not _quantile_is_valid(q):
4165 raise ValueError("Percentiles must be in the range [0, 100]")
-> 4166 return _quantile_unchecked(
4167 a, q, axis, out, overwrite_input, method, keepdims)

File ~/.local/envs/hydrosar/lib/python3.9/site-packages/numpy/lib/function_base.py:4424, in _quantile_unchecked(a, q, axis, out, overwrite_input, method, keepdims)
4416 def _quantile_unchecked(a,
4417 q,
4418 axis=None,
(...)
4421 method="linear",
4422 keepdims=False):
4423 """Assumes that q is in [0, 1], and is an ndarray"""
-> 4424 r, k = _ureduce(a,
4425 func=_quantile_ureduce_func,
4426 q=q,
4427 axis=axis,
4428 out=out,
4429 overwrite_input=overwrite_input,
4430 method=method)
4431 if keepdims:
4432 return r.reshape(q.shape + k)

File ~/.local/envs/hydrosar/lib/python3.9/site-packages/numpy/lib/function_base.py:3725, in _ureduce(a, func, **kwargs)
3722 else:
3723 keepdim = (1,) * a.ndim
-> 3725 r = func(a, **kwargs)
3726 return r, keepdim

File ~/.local/envs/hydrosar/lib/python3.9/site-packages/numpy/lib/function_base.py:4593, in _quantile_ureduce_func(a, q, axis, out, overwrite_input, method)
4591 else:
4592 arr = a.copy()
-> 4593 result = _quantile(arr,
4594 quantiles=q,
4595 axis=axis,
4596 method=method,
4597 out=out)
4598 return result

File ~/.local/envs/hydrosar/lib/python3.9/site-packages/numpy/lib/function_base.py:4710, in _quantile(arr, quantiles, axis, method, out)
4708 result_shape = virtual_indexes.shape + (1,) * (arr.ndim - 1)
4709 gamma = gamma.reshape(result_shape)
-> 4710 result = _lerp(previous,
4711 next,
4712 gamma,
4713 out=out)
4714 if np.any(slices_having_nans):
4715 if result.ndim == 0 and out is None:
4716 # can't write to a scalar

File ~/.local/envs/hydrosar/lib/python3.9/site-packages/numpy/lib/function_base.py:4530, in _lerp(a, b, t, out)
4528 # asanyarray is a stop-gap until gh-13105
4529 lerp_interpolation = asanyarray(add(a, diff_b_a * t, out=out))
-> 4530 subtract(b, diff_b_a * (1 - t), out=lerp_interpolation, where=t >= 0.5)
4531 if lerp_interpolation.ndim == 0 and out is None:
4532 lerp_interpolation = lerp_interpolation[()] # unpack 0d arrays

ValueError: output array is read-only

ASF GRFN products and GDAL3's vsis3

Hi,
Don't know if this is the right place to report this. Most of us end up using jupyter via conda and looks like gdal3 build with conda might not be recognizing netcdf_mem.h correctly. If this is not an issue with custom build GDAL; then this should be reported to conda-forge/gdal-feedstock.

I remember this being addressed by OSGeo/gdal#1328

Here is a test script that shows that GRFN products are interpreted as HDF5:

#This is from https://media.asf.alaska.edu/uploads/InSAR/temporary_security_credentials.py
from json import loads
from requests import get

credential_url = 'https://grfn.asf.alaska.edu/door/credentials'
response = get(credential_url)
response.raise_for_status()

credentials = loads(response.text)['Credentials']

## This is how you use ASF s3 credentials with GDAL
from osgeo import gdal
gdal.SetConfigOption('AWS_REGION', 'us-east-1')
gdal.SetConfigOption('AWS_SECRET_ACCESS_KEY', credentials['SecretAccessKey'])
gdal.SetConfigOption('AWS_ACCESS_KEY_ID', credentials['AccessKeyId'])
gdal.SetConfigOption('AWS_SESSION_TOKEN', credentials['SessionToken'])

results = gdal.Info('/vsis3/grfn-content-prod/S1-GUNW-D-R-160-tops-20190710_20190628-162436-20935N_18926N-PP-6a53-v2_0_2.nc')
print(results)

Piyush

kmz files is not opening and issue with the selection of area of interest.

I process and finished InSAR using Mintpy and used the kmz file to view in google earth pro. it is only showing color bar.

velocity (2).zip

but same file when i open using QGIS, i can see it but it freezes the qgis and i also can't use basemap.
qgis

Also, Is there way to give the coordinates as polygon vector of my area of interest instead of selecting an area. As it is not satellite image or also we cannot zoom in or zoom out. It is hard to select only the study area. I always end of selecting more area then necessary.
sdf

Change GPL-3.0 license to BSD-3 license

Proposal: Change GPL-3.0 license to BSD-3 license


Motivation

This repository is currently licensed under the terms and conditions of the
GPL-3.0 license. GPL-3.0 is
copy-left which requires downstream projects to use the same license, prohibits
commercial use, and is not the NASA ESDS Open Source Software Policy.

ASF would like to change this repositories license to a permissive-use BSD-3 license
in order to be compliant with ESDS policy and be less restrictive to downstream projects.

ASF will only re-license notebooks that have approval from 100% of their named contributors.

Contributor Responses

Contributors will be contacted via email, and responses will be gathered via email responses
or comments on this issue.

Contributor Affiliation Date Contacted Response Response source
P.S. Agram Descartes Labs 2021-04-06 Approved comment
M.S. Baker UNAVCO
David Bekaert JPL 2021-04-06 & 2021-04-21 Approved email
Rowan Biessel ASF 2021-04-06 Approved Mattermost
A Donnellan JPL 2021-04-06 & 2021-04-21 Approved email
Heresh Fattahi JPL 2021-04-06 & 2021-04-21
Eric Fielding JPL 2021-04-06 Approved email
G. Funning UC Riverside 2021-04-06 Approved email
S Hensley JPL 2021-04-06 & 2021-04-21
MinJeong Jo NASA 2021-04-06 & 2021-04-21 Approved email
Josef Kellndorfer Earth Big Data, LLC 2021-04-06 & 2021-04-21 Approved comment
Joseph Kennedy ASF 2021-04-01 Approved in-person
Joshua J C Knicely UAF 2021-04-06 Approved email
Alex Lewandowski ASF 2021-04-01 Approved in-person
Franz Meyer ASF 2021-04-06 Approved in-person
Lichao Mou German Aerospace Center 2021-04-06 Approved email
Jim Nelson BYU 2021-04-06 Approved email
NISAR Solid Earth Team n/a
Batuhan Osmanoglu NASA 2021-04-06 Approved comment
Paul Rosen JPL 2021-04-06 & 2021-04-21
Zhang Yunjun Caltech 2021-04-06 Approved email
Xiaoxiang Zhu German Aerospace Center 2021-04-06 Approved email

Any notebooks not fully approved for re-licensing will retain their GPL-3.0 license,
which may necessitate their removal from the asf-jupyter-notebook repository.

Relicensing denied:

Below is a list of notebooks whose contributors have denied relicensing and
will need to either maintain their current license or be removed from the repository.
The strategy moving forward for these notebooks will be determined at a later date, with
input from all relevant contributors.

MintPy import in LosAngeles_time_series nb

The latest update of Mintpy requires the imports be modified slightly. I think the code below should work.

from mintpy import plot_coherence_matrix
from mintpy.cli import view, tsview, plot_network, plot_transection

Vertical and Horizontal Displacement

@Alex-Lewandowski @khogenso @piyushrpt Hello, first of all, thank you for the work done. Within the scope of Opensciencelab, I processed my human data with h3py + mintpy notebooks and created displacement maps in the LOS direction. However, using my results from ascending and descending orbits, I want to separate the LOS direction into vertical and horizontal components. Can you help, if there is any solution for this I may have missed it.

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.