faninsar.PairsFactory#
- class faninsar.PairsFactory(dates: Sequence, **kwargs)[source]#
Bases:
objectA class used to generate interferometric pairs for InSAR processing.
- __init__(dates: Sequence, **kwargs) None[source]#
Initialize the PairGenerator class.
- Parameters:
dates (Sequence) – Sequence object that contains the dates. Can be any object that accepted by
pd.to_datetime()kwargs (dict, optional) – Keyword arguments passed to
pd.to_datetime()
Methods
__init__(dates, **kwargs)Initialize the PairGenerator class.
from_interval([max_interval, max_day])Generate interferometric pairs by SAR acquisition interval.
from_period([period_start, period_end, ...])Generate interferometric pairs between periods for all years.
from_summer_winter([summer_start, ...])Generate interferometric pairs between summer and winter in each year.
linking_winter([winter_start, winter_end, ...])Generate interferometric pairs linking winter in each year.
- from_interval(max_interval: int = 2, max_day: int = 180) Pairs[source]#
Generate interferometric pairs by SAR acquisition interval.
SAR acquisition interval is defined as the number of SAR acquisitions between two SAR acquisitions.
Example
If the SAR acquisition interval is 2, then the interferometric pairs will be generated between SAR acquisitions with interval of 1 and 2. This will be useful to generate interferometric pairs with different temporal baselines.
- Parameters:
- Returns:
pairs
- Return type:
Pairs object
- from_period(period_start: str = '0101', period_end: str = '0331', n_per_period: int | None = None, n_primary_period: str | None = None, primary_years: list[int] | None = None) Pairs[source]#
Generate interferometric pairs between periods for all years.
period is defined by month and day for each year. For example, period_start=’0101’, period_end=’0331’ means the period is from Dec 1 to Mar 31 for each year in the time series. This function will randomly select n_per_period dates in each period and generate interferometric pairs between those dates. This will be useful to mitigate the temporal cumulative bias.
- Parameters:
period_start (str) – start and end date for the period which expressed as month and day with format ‘%m%d’
period_end (str) – start and end date for the period which expressed as month and day with format ‘%m%d’
n_per_period (int | None) – how many dates will be used for each period. Those dates will be selected randomly in each period. If None, all dates in the period will be used. Default is None.
n_primary_period (int, optional) – how many periods/years used as primary date of ifg. For example, if n_primary_period=2, then the interferometric pairs will be generated between the first two periods and the rest periods. If None, all periods will be used. Default is None.
primary_years (list, optional) – years used as primary date of ifg. If None, all years in the time series will be used. Default is None.
- Returns:
pairs
- Return type:
Pairs object
- from_summer_winter(summer_start: str = '0801', summer_end: str = '1001', winter_start: str = '1201', winter_end: str = '0331') Pairs[source]#
Generate interferometric pairs between summer and winter in each year.
summer and winter are defined by month and day for each year. For example, summer_start=’0801’, summer_end=’1001’ means the summer is from Aug 1to Oct 1 for each year in the time series. This will be useful to add pairs for whole thawing and freezing process.
- Parameters:
summer_start (str) – start and end date for the summer which expressed as month and day with format ‘%m%d’
summer_end (str) – start and end date for the summer which expressed as month and day with format ‘%m%d’
winter_start (str) – start and end date for the winter which expressed as month and day with format ‘%m%d’
winter_end (str) – start and end date for the winter which expressed as month and day with format ‘%m%d’
- Return type:
Pairs object
- linking_winter(winter_start: str = '0101', winter_end: str = '0331', n_per_winter: int = 5, max_winter_interval: int = 1) Pairs[source]#
Generate interferometric pairs linking winter in each year.
winter is defined by month and day for each year. For instance, winter_start=’0101’, winter_end=’0331’ means the winter is from Jan 1 to Mar 31 for each year in the time series. This will be useful to add pairs for completely frozen period across years in permafrost region.
- Parameters:
winter_start (str) – start and end date for the winter which expressed as month and day with format ‘%m%d’
winter_end (str) – start and end date for the winter which expressed as month and day with format ‘%m%d’
n_per_winter (int) – how many dates will be used for each winter. Those dates will be selected randomly in each winter. Default is 5
max_winter_interval (int) – max interval between winters for interferometric pair. If max_winter_interval=1, hen the interferometric pairs will be generated between neighboring winters.
- Returns:
pairs
- Return type:
Pairs object