Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

align public signate of create_[tasking|repeat]_request with console-… #96

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 28 additions & 47 deletions capella_console_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,35 +113,27 @@ def create_tasking_request(self, **kwargs):
geometry: A GeoJSON representation of the area/point of interest. Must be either a polygon or point
name: Can be used along with description to help characterize and describe the tasking request. Default: ""
description: Can be used along with name to help characterize and describe the tasking request. Default: ""
collection_type: The collection type sets the collect mode, number of looks, and resolutions for the resulting imagery. The available collection types can be found by submitting: GET https://api.capellaspace.com/collectiontypes
collection_tier: Preference for data to be collected within a certain time after window_open. Can be one of "urgent", "priority", "standard", and "flexible". Default: "standard"
window_open: Earliest time (in UTC) that you would like data to be collected. Default: Now
window_close: Latest time (in UTC) that you would like data to be collected. Default: Seven days after window_open
collection_tier: Preference for data to be collected within a certain time after window_open. Can be one of "urgent", "priority", "standard", and "flexible". Default: "standard"
product_category: Category used to define image collection. "Extended" has broader look angles and "Custom" allows specifying advanced image acquisition parameters. More information on the specifics of each can be found at https://support.capellaspace.com/hc/en-us/articles/360049110852-SAR-Imagery-Product-Tasking-Categories. One of "standard", "extended", and "custom". Default: "standard"
product_types: List of analytics to add to the order along with the imagery. Currently available analytics are Amplitude Change Detection and Vessel Detection. One of "ACD", "VS". Default: None
archive_holdback: If defined will specify a time period during which the resulting imagery will be kept from the publicly accessible archive. One of "none", "one_year", "thirty_day", "permanent". Default: "none"
custom_attribute_1: Can be used along with custom_attribute_2 to help you track a Capella task with your own metadata or internal systems. Default: None
custom_attribute_2: Can be used along with custom_attribute_1 to help you track a Capella task with your own metadata or internal systems. Default: None
collect_mode: Collect mode to be used by the satellite when making the collect. One of "spotlight", "stripmap", "sliding_spotlight". Default: "spotlight"
look_direction: Constraint on view angle. One of "right", "left", "either". Default: "either"
asc_dsc: Constraint on ascending/descending pass. One of "ascending", "descending", "either". Default: "either"
orbital_planes: List of orbital planes allowed to service request. If empty any spacecraft in any plane can service request. One of 45, 53, 97. Default: None
local_time: Times, in the timezone of the area where the image will be collected, during which the collect can be taken. Represented by a list of time ranges as seconds in the day. For example, [[21600, 64800]] would allow collects between 6 AM and 6 PM; [[0, 21600], [64800, 86400]] would allow collects between 6 PM and 12 AM as well as from 12 AM to 6 AM. Alternatively, you can pass string values of "day", "night", or "anytime" which are parsed to [[21600, 64800]], [[0, 21600], [64800, 86400]], and [[0, 86400]] respectively. Default: None
product_types: List of analytics to add to the order along with the imagery. Currently available analytics are Vessel classification (VC), Default: None
off_nadir_min: Minimum off-nadir angle permitted. Must be less than off_nadir_max. Default: None
off_nadir_max: Maximum off-nadir angle permitted. Must be greater than off_nadir_min. Default: None
elevation_min: Minimum elevation angle permitted. Default: None
elevation_max: Maximum elevation angle permitted. Default: None
image_length: Image length. Default: None
image_width: Image width. Default: None
azimuth: Azimuth angle at collect mid-time. Clockwise angle from North to the spacecraft in the target frame of reference. Default: None
grr_min: Minimum ground-range resolution. Minimum is in ordinal sense. Default: None
grr_max: Maximum ground-range resolution. Maximum is in ordinal sense. Default: None
srr_min: Minimum slant-range resolution. Minimum is in ordinal sense. Default: None
srr_max: Maximum slant-range resolution. Maximum is in ordinal sense. Default: None
azr_min: Minimum azimuth resolution. Minimum is in ordinal sense. Default: None
azr_max: Maximum azimuth resolution. Maximum is in ordinal sense. Default: None
nesz_max: Maximum allowable NESZ of resulting collect. Default: None
num_looks: Number of looks to use in processing collect. Default: None
image_width: Image width. Units: [m], Default: None
orbital_planes: List of orbital planes allowed to service request. If empty any spacecraft in any plane can service request. One of 45, 53, 97. Default: None
asc_dsc: Constraint on ascending/descending pass. One of "ascending", "descending", "either". Default: "either"
look_direction: Constraint on view angle. One of "right", "left", "either". Default: "either"
polarization: Image polarization. One of "HH", "VV". Default: None
archive_holdback: If defined will specify a time period during which the resulting imagery will be kept from the publicly accessible archive. One of "none", "one_year", "thirty_day", "permanent". Default: "none"
custom_attribute_1: Can be used along with custom_attribute_2 to help you track a Capella task with your own metadata or internal systems. Default: None
custom_attribute_2: Can be used along with custom_attribute_1 to help you track a Capella task with your own metadata or internal systems. Default: None
pre_approval: will skip the tasking request cost review step if set to true. Default: false
azimuth_angle_min: clockwise angle with respect to North in a topocentric geodetic ENZ coordinate system from the target to the satellite. Default: None
azimuth_angle_max: clockwise angle with respect to North in a topocentric geodetic ENZ coordinate system from the target to the satellite. Default: None
squint: Determines if generated collects will be squinted. One of: enabled, forward, backward. Default: enabled for point requests, disabled for area requests
max_squint_angle: max. allowed absolute squint angle when generating collects. Units: [degrees]. Default: None

Returns:
Dict[str, Any]: created tasking request metadata
Expand Down Expand Up @@ -221,38 +213,27 @@ def create_repeat_request(self, **kwargs):
name: Can be used along with description to help characterize and describe the tasking request. Default: ""
description: Can be used along with name to help characterize and describe the tasking request. Default: ""
collection_tier: Preference for data to be collected within a certain time after window_open. Can be either "flexible" or "routine". Default: "routine"
product_category: Category used to define image collection. "Extended" has broader look angles and "Custom" allows specifying advanced image acquisition parameters. More information on the specifics of each can be found at https://support.capellaspace.com/hc/en-us/articles/360049110852-SAR-Imagery-Product-Tasking-Categories. One of "standard", "extended", and "custom". Default: "standard"
archive_holdback: If defined will specify a time period during which the resulting imagery will be kept from the publicly accessible archive. One of "none", "one_year", "thirty_day", "permanent". Default: "none"
custom_attribute_1: Can be used along with custom_attribute_2 to help you track a Capella task with your own metadata or internal systems. Default: None
custom_attribute_2: Can be used along with custom_attribute_1 to help you track a Capella task with your own metadata or internal systems. Default: None
product_types: List of analytics to add to the order along with the imagery. Currently available analytics are Amplitude Change Detection and Vessel Detection. One of "ACD", "VS". Default: None
collection_type: The collection type sets the collect mode, number of looks, and resolutions for the resulting imagery. The available collection types can be found by submitting: GET https://api.capellaspace.com/collectiontypes
repeat_start: Starting date (in UTC) when you would like data to begin being collected. Default: Now
repeat_end: Starting date (in UTC) when you would like data to stop being collected. This and repetition_count are mutually exclusive; only one of them can be defined per request. Default: None
repetition_interval: Number of days between the start of each derived request. Default: 7
repetition_count: Total number of acquisitions in the repeat series. This and repeat_end are mutually exclusive; only one of them can be defined per request. Default: None
maintain_scene_framing: Whether to maintain consistent framing (look-direction, ascending/descending, orbital-plane) across all acquisitions. Default: False
look_angle_tolerance: Tolerance to look-angle deviations across all acquisitions. Default: None
collect_mode: Collect mode to be used by the satellite when making the collect. One of "spotlight", "stripmap", "sliding_spotlight". Default: "spotlight"
look_direction: Constraint on view angle. One of "right", "left", "either". Default: "either"
asc_dsc: Constraint on ascending/descending pass. One of "ascending", "descending", "either". Default: "either"
orbital_planes: List of orbital planes allowed to service request. If empty any spacecraft in any plane can service request. One of 45, 53, 97. Default: None
local_time: Times, in the timezone of the area where the image will be collected, during which the collect can be taken. Represented by a list of time ranges as seconds in the day. For example, [[21600, 64800]] would allow collects between 6 AM and 6 PM; [[0, 21600], [64800, 86400]] would allow collects between 6 PM and 12 AM as well as from 12 AM to 6 AM. Alternatively, you can pass string values of "day", "night", or "anytime" which are parsed to [[21600, 64800]], [[0, 21600], [64800, 86400]], and [[0, 86400]] respectively. Default: None
product_types: List of analytics to add to the order along with the imagery. Currently available analytics are Vessel classification (VC), Default: None
off_nadir_min: Minimum off-nadir angle permitted. Must be less than off_nadir_max. Default: None
off_nadir_max: Maximum off-nadir angle permitted. Must be greater than off_nadir_min. Default: None
elevation_min: Minimum elevation angle permitted. Default: None
elevation_max: Maximum elevation angle permitted. Default: None
image_length: Image length. Default: None
image_width: Image width. Default: None
azimuth: Azimuth angle at collect mid-time. Clockwise angle from North to the spacecraft in the target frame of reference. Default: None
grr_min: Minimum ground-range resolution. Minimum is in ordinal sense. Default: None
grr_max: Maximum ground-range resolution. Maximum is in ordinal sense. Default: None
srr_min: Minimum slant-range resolution. Minimum is in ordinal sense. Default: None
srr_max: Maximum slant-range resolution. Maximum is in ordinal sense. Default: None
azr_min: Minimum azimuth resolution. Minimum is in ordinal sense. Default: None
azr_max: Maximum azimuth resolution. Maximum is in ordinal sense. Default: None
nesz_max: Maximum allowable NESZ of resulting collect. Default: None
num_looks: Number of looks to use in processing collect. Default: None
image_width: Image width. Units: [m], Default: None
orbital_planes: List of orbital planes allowed to service request. If empty any spacecraft in any plane can service request. One of 45, 53, 97. Default: None
asc_dsc: Constraint on ascending/descending pass. One of "ascending", "descending", "either". Default: "either"
look_direction: Constraint on view angle. One of "right", "left", "either". Default: "either"
polarization: Image polarization. One of "HH", "VV". Default: None
archive_holdback: If defined will specify a time period during which the resulting imagery will be kept from the publicly accessible archive. One of "none", "one_year", "thirty_day", "permanent". Default: "none"
custom_attribute_1: Can be used along with custom_attribute_2 to help you track a Capella task with your own metadata or internal systems. Default: None
custom_attribute_2: Can be used along with custom_attribute_1 to help you track a Capella task with your own metadata or internal systems. Default: None
azimuth_angle_min: clockwise angle with respect to North in a topocentric geodetic ENZ coordinate system from the target to the satellite. Default: None
azimuth_angle_max: clockwise angle with respect to North in a topocentric geodetic ENZ coordinate system from the target to the satellite. Default: None
squint: Determines if generated collects will be squinted. One of: enabled, forward, backward. Default: enabled for point requests, disabled for area requests
max_squint_angle: max. allowed absolute squint angle when generating collects. Units: [degr

Returns:
Dict[str, Any]: created repeat request metadata
Expand Down
27 changes: 8 additions & 19 deletions capella_console_client/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,27 +105,18 @@

_COMMON_COLLECT_CONSTRAINTS_FIELDS = frozenset(
[
"collect_mode",
"look_direction",
"asc_dsc",
"orbital_planes",
"local_time",
"off_nadir_min",
"off_nadir_max",
"elevation_min",
"elevation_max",
"image_length",
"image_width",
"azimuth",
"grr_min",
"grr_max",
"srr_min",
"srr_max",
"azr_min",
"azr_max",
"nesz_max",
"num_looks",
"orbital_planes",
"asc_dsc",
"look_direction",
"local_time",
"polarization",
"azimuth_angle_min",
"azimuth_angle_max",
"squint",
"max_squint_angle",
]
)
TASKING_REQUEST_COLLECT_CONSTRAINTS_FIELDS = _COMMON_COLLECT_CONSTRAINTS_FIELDS.copy()
Expand All @@ -138,7 +129,5 @@
"repeat_end",
"repetition_interval",
"repetition_count",
"maintain_scene_framing",
"look_angle_tolerance",
]
)
27 changes: 25 additions & 2 deletions capella_console_client/enumerations.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,17 @@ class RepeatCollectionTier(str, BaseEnum):
internal = "internal"


class RepeatCycle(int, BaseEnum):
DAILY = 1
WEEKLY = 7
BI_WEEKLY = 14
MONTHLY = 30


class ArchiveHoldback(str, BaseEnum):
none = "none"
one_year = "1 year"
thirty_day = "30 day"
one_year = "1_year"
thirty_day = "30_day"
permanent = "permanent"


Expand All @@ -134,3 +141,19 @@ class OwnershipOption(str, BaseEnum):
@classmethod
def is_valid(cls, option_str: str) -> bool:
return option_str in list(cls)


class CollectionType(str, BaseEnum):
SPOTLIGHT = "spotlight"
SPOTLIGHT_ULTRA = "spotlight_ultra"
SPOTLIGHT_WIDE = "spotlight_wide"
STRIPMAP_20 = "stripmap_20"
STRIPMAP_50 = "stripmap_50"
STRIPMAP_100 = "stripmap_100"


class SquintMode(str, BaseEnum):
ENABLED = "enabled"
DISABLED = "disabled"
FORWARD = "forward"
BACKWARD = "backward"
Loading
Loading