From 774e3fb9ecd9cbe55806dedc6a62c43abaa2244e Mon Sep 17 00:00:00 2001 From: Jessica Scheick Date: Fri, 15 Dec 2023 16:57:01 -0500 Subject: [PATCH] more == to is and shorten some lines --- icepyx/core/query.py | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/icepyx/core/query.py b/icepyx/core/query.py index 400d10c55..87b9cc2cf 100644 --- a/icepyx/core/query.py +++ b/icepyx/core/query.py @@ -407,13 +407,9 @@ def __init__( **kwargs, ): # Check necessary combination of input has been specified - if ( - (product is None or spatial_extent is None) - or ( - (date_range is None and cycles is None and tracks is None) - and int(product[-2:]) <= 13 - ) - and files is None + if (product is None or spatial_extent is None) or ( + (date_range is None and cycles is None and tracks is None) + and int(product[-2:]) <= 13 ): raise ValueError( "Please provide the required inputs. Use help([function]) to view the function's documentation" @@ -615,7 +611,8 @@ def subsetparams(self, **kwargs): **kwargs : key-value pairs Additional parameters to be passed to the subsetter. By default temporal and spatial subset keys are passed. - Acceptable key values are ['format','projection','projection_parameters','Coverage']. + Acceptable key values are + ['format','projection','projection_parameters','Coverage']. At this time (2020-05), only variable ('Coverage') parameters will be automatically formatted. See Also @@ -714,8 +711,10 @@ def order_vars(self): auth=self.auth, ) - # I think this is where property setters come in, and one should be used here? Right now order_vars.avail is only filled in - # if _cust_options exists when the class is initialized, but not if _cust_options is filled in prior to another call to order_vars + # I think this is where property setters come in, and one should be used here? + # Right now order_vars.avail is only filled in + # if _cust_options exists when the class is initialized, + # but not if _cust_options is filled in prior to another call to order_vars # if self._order_vars.avail == None and hasattr(self, '_cust_options'): # print('got into the loop') # self._order_vars.avail = self._cust_options['variables'] @@ -726,7 +725,8 @@ def order_vars(self): def granules(self): """ Return the granules object, which provides the underlying funtionality for searching, ordering, - and downloading granules for the specified product. Users are encouraged to use the built in wrappers + and downloading granules for the specified product. + Users are encouraged to use the built-in wrappers rather than trying to access the granules object themselves. See Also @@ -767,7 +767,11 @@ def product_summary_info(self): version_id : 006 time_start : 2018-10-14T00:00:00.000Z coordinate_system : CARTESIAN - summary : This data set (ATL06) provides geolocated, land-ice surface heights (above the WGS 84 ellipsoid, ITRF2014 reference frame), plus ancillary parameters that can be used to interpret and assess the quality of the height estimates. The data were acquired by the Advanced Topographic Laser Altimeter System (ATLAS) instrument on board the Ice, Cloud and land Elevation Satellite-2 (ICESat-2) observatory. + summary : "This data set (ATL06) provides geolocated, land-ice + surface heights (above the WGS 84 ellipsoid, ITRF2014 reference frame), plus ancillary + parameters that can be used to interpret and assess the quality of the height estimates. + The data were acquired by the Advanced Topographic Laser Altimeter System (ATLAS) + instrument on board the Ice, Cloud and land Elevation Satellite-2 (ICESat-2) observatory." orbit_parameters : {} """ if not hasattr(self, "_about_product"): @@ -1106,7 +1110,7 @@ def download_granules( if not hasattr(self, "_granules"): self.granules - if restart == True: + if restart is True: pass else: if (