All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to PEP 440 and uses Semantic Versioning.
- Fixed setting end date timezone when translating search opts to CMR opts
- Added
asf.ASFSearchOptions(circle=[lat, long, radius])
search param. Takes list of exactly 3 numbers. - Exposed
asf.validator_map
, which given a ops search param, can be used to look up which method we're going to validate it against. - Exposed
ASFProduct.get_urls
which returns the URL's for it's products directly. Can control which products with thefileType
enum.
- Removes
get_property_paths()
static method fromASFProduct
, just uses_base_properties
- replaces
ciso8601
package withdateutil
for package wheel compatibility.ciso8601
used when installed viaextra
dependency
- Fixes syntax warning with escaped slash in
translate.py
- Adds missing values for polarization constants
DUAL_HH
,DUAL_VV
,DUAL_HV
,DUAL_VH
,HH_3SCAN
,HH_4SCAN
,HH_5SCAN
- processingLevel
RAW
now includesC1234413256-ASFDEV
in collection alias list (SENTINEL-1B_RAW
's collection for ASFDEV provider)
OPERAS1Product
subclass now properly assigned to PGE v2.0.1 results
ARIAS1GUNWProduct.is_ARIAS1GUNWProduct()
removed, replaced withASFProduct._is_subclass()
implementation
- Uses
ciso8601.parse_datetime()
in baseline calculations, speeds up calculations on larger stacks
- Adds
ASF_LOGGER
logging insearch_generator()
and related methods
ASFProduct.get_sort_keys()
will no longer returnsNone
if missing sort key, defaults to empty string
- Improved logging in
ASFSession
authentication methods
- Uses
ciso8601
module for parsing dates from CMR response, significant performance improvement post-query ASFSession
now allows for authorized user access to hidden/restricted CMR datasets viaauth_with_creds()
orauth_with_cookiejar()
authentication methods (previously only supported viaauth_with_token()
method)ASFSession.auth_with_token()
now authenticates directly against EDL endpoint- UMM Platform ShortName used as final fallback criteria for product subclass assignment
- collection "ARIA_S1_GUNW" added to
ARIA_S1_GUNW
dataset, V3 products now loaded asARIAS1GUNWProduct
subclass ARIAS1GUNWProduct
now exposesariaVersion
and (for V3 products)inputGranules
inARIAS1GUNWProduct.properties
s3Urls
property added toS1Product
,OPERAS1Product
, andNISARProduct
types, exposing direct access S3 links
- Adds
cmr_keywords
search keyword, enables passing CMR format strings in search directly - Adds
shortName
keyword, for use with lists of collection short names
- Allows using
dataset
andplatform
in same search
- timestamps while building queries and reading results from CMR now use UTC if no timezone is provided
- Changed what collections the
NISAR
dataset and platform collections lists are pointed at.
- Adds basic NISAR dataset search and product functionality for test data
OPERA-S1-CALIBRATION
dataset is now theOPERA-S1-CALVAL
dataset, uses theOPERA_S1_CALVAL
constant
- Fixes typo for constant variable name
constants.PRODUCT_TYPE.CSLC_STATIC
- Normalizes concept-id lists for
OPERA-S1
dataset product types
- Completely removes
CSLC-STATIC
Calval andRTC-STATIC
Calval collections from concept-id lists
- Adds
AUTH_COOKIES
toconstants.INTERNAL
andauth_cookie_names
variable forASFSession
, used byauth_with_creds()
andauth_with_cookiejar()
to confirm login.
- Attempting to authorize
ASFSession
against CMR UAT usingauth_with_creds()
andauth_with_cookiejar()
no longer raises an exception on valid login - Fixes custom host in
ASFSearchOptions
raising type error while searching.
- Fixed
OPERA-S1-CALIBRATION
dataset products raising error during search.
ASFProduct
now has 13 sublcasses for different sub-products that correspond to datasets:S1Product
,S1BurstProduct
,OPERAS1Product
,ARIAS1GUNWProduct
,ALOSProduct
,RADARSATProduct
,AIRSARProduct
,ERSProduct
,JERSProduct
,UAVSARProduct
,SIRCProduct
,SEASATProduct
,SMAPProduct
- Each subclass defines relevant keys to pull from
umm
response, reducing the amount of irrelevant values inproperties
dict for certain product types
- Adds
collectionAlias
toASFSearchOptions
validator map as config param. Set toFalse
to disable concept-id aliasing behaviour forprocessingLevel
andplatform
. - Adds warning when scenes in stack are missing state vectors, and logs baseline warnings with
ASF_LOGGER
- Adds
OPERA-S1-CALIBRATION
entry todataset_collections
and correspondingOPERA_S1_CALIBRATION
constant toDATASET.py
, used to search for OPERA-S1CSLC
andRTC
calibration data.
remotezip
is now an optional dependency of asf-search's pip and conda installs, (pip install example:python3 -m pip install asf-search[extras]
).- Constants are no longer top level import, are now accessible through respective modules
processingLevel
andplatform
are now aliased by collection concept-ids, (lists of concept ids by their processing levels/platforms viewable indataset.py
), improving search performance and dodging subquery system- Baseline stacking no longer excludes products with missing state vectors from final stack, like SearchAPI
OPERA-S1
dataset no longer includes calibration data (moved to new dataset)- Adds optional
ASFSession
constructor keyword arguments for new class variables:edl_host
edl_client_id
asf_auth_host
cmr_host
cmr_collections
auth_domains
ASFSession
importsasf_search.constants.INTERNAL
in constructor callASFSession
methodsauth_with_creds()
,auth_with_token()
, andrebuild_auth()
use new class variables instead of constants
- Adds OPERA-S1 constants
RTC
,RTC_STATIC
(RTC-STATIC),CSLC
,CSLC_STATIC
(CSLC-STATIC) toPRODUCT_TYPE.py
- Harmonizes
search()
,geo_search()
, andsearch_count()
parameters - Updates python version requirement in
setup.py
to 3.8+
- search method params with
Iterable
type hinting now changed toSequence
- search method param validators updated to support
Sequence
type
- Adds constants for
dataset
keyword, underasf_search.DATASET
- Adds CALVAL concept-ids to 'OPERA-S1' dataset
- Adds
validityStartDate
for applicable OPERA-S1 products
- Fixes OPERA-S1 dataset
RTC-STATIC
andCSLC-STATIC
breaking returned results, sorts byvalidityStartDate
in place ofstopTime
- Fixes issue with certain S1 products not stacking properly in certain environments, which caused null
perpendicularBaseline
values
- Adds new
dataset
keyword tosearch()
as an alternative toplatform
. Allows users to get results from multiple platforms at once in a single page - Adds
operaBurstID
keyword tosearch()
- Adds OPERA-S1 param
operaBurstID
toASFProduct.properties
, and adds Opera product urls toadditionalUrls
- OPERA-S1 RTC product
polarization
now shows both polarizations as list - adds
frameNumber
properties support for newSentinel-1 Interferogram
products - added
CMR_TIMEOUT
constant. This is the amount of time in seconds to wait without seeing any data. (Default=30)
- Changes
CMR_FORMAT_EXT
constant fromumm_json_v1_4
toumm_json
, umm returned from CMR will now be in latest umm format by default
- ERS-1, ERS-2, JERS-1, and RADARSAT-1 now assign
FRAME_NUMBER
to theframeNumber
properties field
- Fixes type hinting compatibility break introduced in v6.6.2 in
search_generator.py
for Python versions < v3.9
- Adds new
CMRIncompleteError
exception, raised by search methods when CMR returns an incomplete page
- Fixes bug in
search_generator()
causing results to sometimes wrongly be marked as incomplete
stack_from_id()
now raises if results are incomplete, before checking if reference was found
- Adds automated release notes
filename
can be used again withASFProduct.Download()
method (ignored if multiple files are to be downloaded)
- Adds
fileType
param toASFProduct
andASFSearchResults
download method. Let's users download burst .xml and/or .tiff from the burst extractor withFileDownloadType
enum (DEFAULT_FILE
,ADDITIONAL_FILES
,ALL_FILES
)
- Fixes typo in convex hull warning message
- Adds
collections
search keyword, letting results be limited to the provided concept-ids - Adds
temporalBaselineDays
search keyword, allows searchingSentinel-1 Interferogram (BETA)
products by their temporal baseline
search_generator()
now uses tenacity library to poll CMR- moves/re-organizes certain constant url fields to
INTERNAL.py
- TimeoutErrors now properly caught and logged
- Burst product downloads now supported
IPFVersion
field added toASFProduct
properties
BURST
producturl
,fileName
, andbytes
properties populated againsearch_count()
now usesASFSearchOptions.host
when building query url
BURST
product baseline stackng now usesfullBurstID
andpolarization
for getting initial stack- Changed order of entries in
ASFSession
'sUser-Agent
header BURST
filename
field uses "sceneName
.extension
" format
- Changed
CMR_PAGE_SIZE
constant from 500 to 250
BURST
product temporal/perpendicular baseline stacking now supported- Added searchable burst keyword params,
relativeBurstID
,absoluteBurstID
, andfullBurstID
validate_wkt()
now returns both wrapped and unwrapped wkts along with repair reports.- asf-search now sends the wrapped wkt to CMR when using the
intersectsWith
keyword - Removed
burstAnxTime
,timeFromAnxSeconds
- Added
azimuthAnxTime
,azimuthTime
search_generator()
returns a generator, which returns results from CMR page-by-page, yielding each page as anASFSearchResults
object. See /examples/1-Basic_Overview.ipynb for an example.- The generator can be passed to different output formats via
results_to_[format]()
methods, allowing users to stream results to different format strings as they're received from CMR
- The generator can be passed to different output formats via
- Removed Jinja2 as a dependency for metalink, kml, and csv output formats.
- Burst metadata available in
ASFProduct.properties['burst']
, also available incsv
,kml
,jsonlite
, andjsonlite2
output formats. - Added
BURST
toPRODUCT_TYPE.py
constants - Added python
logging
support, for easier debugging and reporting when using asf_search inside an application.
- Decreased the scope of tested platforms used in platform test cases
- Adds markupsafe<=2.0.1 as package requirement (Jinja2 requires this version)
- CMR url will now actually use the
host
property inASFSearchOptions
object
- Fixed Setuptools not including csv, kml, and metalink export templates
csv()
,metalink()
, andkml()
output formats should now work properly when installed from pip
- Search errors are now automatically reported to ASF, users can opt out by changing
asf_search.REPORT_ERRORS
after import- Example and information available in "Usage" section of /examples/1-Basic_Overview.ipynb
ASFSearchResults
now hasraise_if_incomplete()
method, raisesASFSearchError()
if a search encountered an error and was unable to return all results from CMRASFProduct
now has aremotezip()
method, which takes a user's pre-authenticatedASFSession
and returns aRemoteZip
object. This can be used to list and download specific files from a product's zip archive, rather than the whole zip file.- Example available in /examples/5-Download.ipynb
- see https://github.com/gtsystem/python-remotezip for further details on how to use the
RemoteZip
class.
- Adds
GRD_FD
,PROJECTED_ML3X3
,THREEFP
product type constants.
- While returning results,
search()
will no longer throw. Instead,search()
will retry the request 3 times. If all 3 attempts fail:search()
will return the results it found before the search error- An error will be logged warning the user, and the returned results will be marked as incomplete. Use
raise_if_incomplete()
to raise an error when the returnedASFSearchResults
are incomplete.
CMR_PAGE_SIZE
reduced from 2000 to 500
- Adds export support to ASFSearchResults for
csv
,jsonlite
,jsonlite2
,kml
,metalink
- example availabe in "Output" section of /examples/1-Basic_Overview.ipynb
- Adds
beamSwath
as a searchable parameter
count()
type hinting changed toint
- Improved testing coverage of
ASFSearchResults
- non-rectangular polygons are now sent to CMR instead of their bounding boxes
ASFProduct
is now aware of the session used during search (if available) and will use that by default to download. A session can still be explicitly provided as before.ASFProduct.stack()
now uses the session provided via the opts argument. If none is provided, it will use the session referenced byASFProduct.session
.ASFProduct
more gracefully handles missing or malformed metadata during instantiation.
asf_search
now searches CMR directly, no longer relying on ASF's SearchAPI- This should significantly improve reliability and performance
- With this change, ALL metadata fields provided by CMR's UMM JSON format are now available through
ASFProduct
.- All metadata fields previously available through
ASFProduct.properties
remain where they are - For those and any other fields, the full CMR
umm
andmeta
records are available throughASFProduct.umm
andASFProduct.meta
respectively
- All metadata fields previously available through
- Some geojson fields were previously presented as strings, they are now more appropriate types such as
int
orfloat
:bytes
,centerLat
,centerLon
,frame
,offNadirAngle
,orbit
,pathNumber
- Timestamps in geojson fields now include an explicit
Z
time zone indicator. ASFSearchOptions.reset()
has been renamed toreset_search()
for clarity of purpose and to make room for future similar functionality regarding search opts configuration.search()
(and related functions) now return results pre-sorted, most recent first
product_search()
now assignsproduct_list
parameter toASFSearchOptions.product_list
instead ofASFSearchOptions.granule_list
- Removed
scikit-learn
module as a dependency, greatly reducing install footprint - Simplified AOI refinement:
- AOIs are iteratively simplified with an increasing threshold, that threshold now starts at 0.004
- AOIs with an MBR <= 0.004 in lat/lon are collapsed to a single point
- AOIs with an MBR <= 0.004 in either lat or lon are collapsed to a line along the center of the rectangle
- Removed WKTUtils module as a dependency, that functionality is now directly included
ASFSearchOptions
: This class provides a number of useful ways to build search results- Search parameters are immediately validated upon object creation/edit instead of at search time, which should lead to fewer errors at search time
- All search functions allow both the previous style of keyword arguments, as well as simply passing in an ASFSearchOptions object using the
opts
keyword arg.opts
is always optional.- If both approaches are used, the two are merged, with specific keyword args superseding the options in the object
- Most search functions now expect only their specific parameters, and an optional
opts
parameter. This allows simple usage in most cases, while theopts
parameter provides access to advanced behavior or alternate workflows.
- Internally, all search functions work by passing ASFSearchOptions objects. This allows consistency when working with differently-configured search environments, such as in development.
ASFSearchResults
objects now include asearchOptions
property, which describes the search used to create those results. This object can be copied, altered, used for subsequent searches, etc.- When downloading,
ASFSearchResults
andASFProduct
default to use the session insidesearchOptions
, so you don't have to pass the same session in for both fetching and downloading results.
- When downloading,
- Exposed
get_stack_opts()
to support more approaches for building insar stacks.get_stack_opts()
accepts anASFProduct
as a stack reference and returns the ASFSearchOptions object that would be used to build a corresponding insar stack- A matching convenience method has been added to
ASFProduct
- A matching convenience method has been added to
- Supports the new
opts
argument described above.
- All search functions now accepts the optional
opts=
argument, seeASFSearchOptions
notes above. - Replaced all
cmr_token
key arguments withsession
, which takes aSession
-compatible object. See https://docs.asf.alaska.edu/asf_search/ASFSession/ for more details. - Removed old GitHub actions
season
filter inasf.search()
now doesn't throw when used.
- netrc authentication works again, affects
ASFProduct.download()
,ASFSearchResults.download()
,download_urls()
,download_url()
ASFProduct.stack()
andasf_search.baseline_search.stack_from_id()
now return ASFSearchResults instead of a list
ASFProduct.stack()
andasf_search.baseline_search.stack_from_id()
now calculatetemporalBaseline
andperpendicularBaseline
values of stacked products locallysearch()
now internally uses a custom format when communicating with ASF's SearchAPI. This should have no apparent impact on current usage of asf_search.
- Centroid calculation fixed for scenes spanning the antimeridian
ASFSession
methodsauth_with_cookiejar()
andauth_with_token()
now raise an error if the passed cookiejar/token is invalid or expiredASFAuthenticationError
raised when encountering a 400 level error while downloading files
- Downloading files with sessions authenticated by
auth_with_token()
method works again
- Fixes missing CMR module import
- Added walkthrough in the form of several jupyter notebooks in /examples
- Added
campaigns()
inCampaigns
module, returns a list of campaigns forUAV, AIRSAR, SENTINEL-1 INTERFEROGRAM (BETA)
platforms
- Re-enable run-pytest workflow
- Add tests for
ASFSearch, ASFSession, ASFProduct
as well as baseline, geographic, and search modules - Add Pytest-Automation Plugin integration
- Add automated CodeCov badge to readme
- Add tests for
- "collectionName" parameter in
geo_search()
andsearch()
is deprecated and raises a warning. Will be removed in a future release, use "campaign" instead
- Fix error while raising ASFBaselineError in
baseline_search.get_stack_params()
- Skip download if file already exists
- In the future we will apply file size and/or checksum checks to ensure the existing file is correct
- Add documentation URL to setup.py
- Add Gitter badge/link to readme
- Change hyphens to underscores in some product type constants
- When working with source, package must be installed directly:
python3 -m pip install -e .
- In-region S3 downloads should now function without issue
- Replace
ASFProduct.centroid()
calculation with shapely-based calculation- See: #53
- Removes numpy requirement
- Adds shapely requirement
- Feature and Bug Report github issue templates
- Fix download authentication header issue during direct-to-S3 redirects
- Fix Sentinel-1 stacking to include both A and B in stacks
- Auth support for username/password and cookiejars, in addition to the previously available token-based approach. Create a session, authenticate it with the method of choice, then pass the session to whichever download method is being used.
- Sessions can be created using the
ASFSession
class, a subclass ofrequests.Session
- Once a session is created, call one of its authentication methods:
auth_with_creds('user', 'pass)
auth_with_token(
EDL token`)auth_with_cookiejar(http.cookiejar)
- If you were previously using the
token
argument, such as:results.download(path='...', token='EDL token')
- Updating can be as simple as:
results.download(path='...', session=ASFSession().auth_with_token('EDL token'))
- Sessions can be re-used and are thread-safe
- Sessions can be created using the
download_url()
,download_urls()
,ASFProduct.download()
andASFSearchResults.download()
now expect asession
argument instead oftoken
- Send auth headers to every step along a download redirect chain (including final AWS S3 buckets)
- INSTRUMENT constants for C-SAR, PALSAR, and ANVIR-2
- Versioning workflow corrected for proper versioning, stop bumping major instead of patch!
- Fixed import order of operations bug
- Updated ASFProduct and ASFSearchResults to use path arg in download methods
- Parallel downloads now supported by ASFSearchResults. Defaults to 1 (sequential download)
- For
search()
-based functions that take an argument as a list, single values are now also allowed
- Import download functionality in asf_search (for
download_url()
anddownload_urls()
) - "parallel" is now "processes" in download functionality
- Fixed ASFProduct import in search.py
- importlib metadata fix for python <3.8
- ASFSearchResults now has a geojson() method which returns a data structure that matches the geojson specification
- ASFProduct now has a geojson() method that produces a data structure matching a geojson feature snippet
- ASFSearchResults and ASFProduct both have a str() methods that serializes the output of their geojson() methods
- Added CodeFactor shield to readme
- Now calculates temporal baselines when building a stack
- New search options:
- min/maxDoppler
- min/MaxFaradayRotation
- flightLine
- offNadirAngle
- season
- ASFProduct is no longer a subclass of dict. Instead, metadata has been moved to .properties and .geometry
- ASFSearchResults is now a subclass of UserList, for list-type operations
- Newly-built stacks are sorted by temporal baselines, ascending
- Cleaned up cruft from various refactors
- Layed out framework for INSTRUMENT constants (needs to be populated)
- Support for baseline stacking of pre-calculated datasets
- Download support for single products or entire search result sets, token-based auth only
- ASFSearchResults and ASFProduct classes
- Lower-level ASFError exception class
- ASFDownloadError exception class
- ASFBaselineError exception class
- Better path/frame/platform/product example
- No longer uses range type for parameters that accept lists of values and/or ranges. Now expects a 2-value tuple.
- Removed DATASET constants (not searchable, use platform+instrument to identify a dataset)
- Updated hello_world.py baseline example
- Removed output options across the board, geojson only until we no longer rely on SearchAPI calls
- insarStackID now a search option (needed for baseline stacking of pre-calculated datasets)
- Flatter structure for constants
- baseline functionality moved into search group (file restructuring)
- Corrected handling of version number in user agent string
- unused import cleanup
- better type hinting on centroid() function
- product_search(): search using a list of Product IDs (CMR's GranuleUR)
- granule_search(): search using a list of Granule names (aka Scene names)
- geo_search(): search using a WKT string, as well as other parameters
- search(): a generic search function, allowing any combination of the above search features
- stack(): provides basic Baseline stacking functionality (does not yet provide perpendicular/temporal baseline values)
- Numerous constants available, covering common BEAMMODE, DATASET, FLIGHT_DIRECTION, PLATFORM, POLARIZATION, and PRODUCT_TYPE values
- Basic exception classes and error handling for search parameter and server errors
- Populated readme with instructions, examples, and badges
- Improved packaging/build process
- Restructured branch layout according to https://gist.github.com/digitaljhelms/4287848
- Removed hard-coded version string
- Install setuptools_scm in pypi publish action