repo
stringlengths
7
55
path
stringlengths
4
127
func_name
stringlengths
1
88
original_string
stringlengths
75
19.8k
language
stringclasses
1 value
code
stringlengths
75
19.8k
code_tokens
list
docstring
stringlengths
3
17.3k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
87
242
partition
stringclasses
1 value
satellogic/telluric
telluric/georaster.py
GeoRaster2.reduce
def reduce(self, op): """Reduce the raster to a score, using 'op' operation. nodata pixels are ignored. op is currently limited to numpy.ma, e.g. 'mean', 'std' etc :returns list of per-band values """ per_band = [getattr(np.ma, op)(self.image.data[band, np.ma.getmaskarra...
python
def reduce(self, op): """Reduce the raster to a score, using 'op' operation. nodata pixels are ignored. op is currently limited to numpy.ma, e.g. 'mean', 'std' etc :returns list of per-band values """ per_band = [getattr(np.ma, op)(self.image.data[band, np.ma.getmaskarra...
[ "def", "reduce", "(", "self", ",", "op", ")", ":", "per_band", "=", "[", "getattr", "(", "np", ".", "ma", ",", "op", ")", "(", "self", ".", "image", ".", "data", "[", "band", ",", "np", ".", "ma", ".", "getmaskarray", "(", "self", ".", "image",...
Reduce the raster to a score, using 'op' operation. nodata pixels are ignored. op is currently limited to numpy.ma, e.g. 'mean', 'std' etc :returns list of per-band values
[ "Reduce", "the", "raster", "to", "a", "score", "using", "op", "operation", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/georaster.py#L1642-L1651
train
satellogic/telluric
telluric/georaster.py
GeoRaster2.mask
def mask(self, vector, mask_shape_nodata=False): """ Set pixels outside vector as nodata. :param vector: GeoVector, GeoFeature, FeatureCollection :param mask_shape_nodata: if True - pixels inside shape are set nodata, if False - outside shape is nodata :return: GeoRaster2 ...
python
def mask(self, vector, mask_shape_nodata=False): """ Set pixels outside vector as nodata. :param vector: GeoVector, GeoFeature, FeatureCollection :param mask_shape_nodata: if True - pixels inside shape are set nodata, if False - outside shape is nodata :return: GeoRaster2 ...
[ "def", "mask", "(", "self", ",", "vector", ",", "mask_shape_nodata", "=", "False", ")", ":", "from", "telluric", ".", "collections", "import", "BaseCollection", "# crop raster to reduce memory footprint", "cropped", "=", "self", ".", "crop", "(", "vector", ")", ...
Set pixels outside vector as nodata. :param vector: GeoVector, GeoFeature, FeatureCollection :param mask_shape_nodata: if True - pixels inside shape are set nodata, if False - outside shape is nodata :return: GeoRaster2
[ "Set", "pixels", "outside", "vector", "as", "nodata", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/georaster.py#L1700-L1721
train
satellogic/telluric
telluric/georaster.py
GeoRaster2.mask_by_value
def mask_by_value(self, nodata): """ Return raster with a mask calculated based on provided value. Only pixels with value=nodata will be masked. :param nodata: value of the pixels that should be masked :return: GeoRaster2 """ return self.copy_with(image=np.ma.mas...
python
def mask_by_value(self, nodata): """ Return raster with a mask calculated based on provided value. Only pixels with value=nodata will be masked. :param nodata: value of the pixels that should be masked :return: GeoRaster2 """ return self.copy_with(image=np.ma.mas...
[ "def", "mask_by_value", "(", "self", ",", "nodata", ")", ":", "return", "self", ".", "copy_with", "(", "image", "=", "np", ".", "ma", ".", "masked_array", "(", "self", ".", "image", ".", "data", ",", "mask", "=", "self", ".", "image", ".", "data", ...
Return raster with a mask calculated based on provided value. Only pixels with value=nodata will be masked. :param nodata: value of the pixels that should be masked :return: GeoRaster2
[ "Return", "raster", "with", "a", "mask", "calculated", "based", "on", "provided", "value", ".", "Only", "pixels", "with", "value", "=", "nodata", "will", "be", "masked", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/georaster.py#L1723-L1731
train
satellogic/telluric
telluric/georaster.py
GeoRaster2.save_cloud_optimized
def save_cloud_optimized(self, dest_url, resampling=Resampling.gauss, blocksize=256, overview_blocksize=256, creation_options=None): """Save as Cloud Optimized GeoTiff object to a new file. :param dest_url: path to the new raster :param resampling: which Resampling ...
python
def save_cloud_optimized(self, dest_url, resampling=Resampling.gauss, blocksize=256, overview_blocksize=256, creation_options=None): """Save as Cloud Optimized GeoTiff object to a new file. :param dest_url: path to the new raster :param resampling: which Resampling ...
[ "def", "save_cloud_optimized", "(", "self", ",", "dest_url", ",", "resampling", "=", "Resampling", ".", "gauss", ",", "blocksize", "=", "256", ",", "overview_blocksize", "=", "256", ",", "creation_options", "=", "None", ")", ":", "src", "=", "self", "# GeoRa...
Save as Cloud Optimized GeoTiff object to a new file. :param dest_url: path to the new raster :param resampling: which Resampling to use on reading, default Resampling.gauss :param blocksize: the size of the blocks default 256 :param overview_blocksize: the block size of the overviews, ...
[ "Save", "as", "Cloud", "Optimized", "GeoTiff", "object", "to", "a", "new", "file", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/georaster.py#L1773-L1794
train
satellogic/telluric
telluric/georaster.py
GeoRaster2._get_window_out_shape
def _get_window_out_shape(self, bands, window, xsize, ysize): """Get the outshape of a window. this method is only used inside get_window to calculate the out_shape """ if xsize and ysize is None: ratio = window.width / xsize ysize = math.ceil(window.height / ra...
python
def _get_window_out_shape(self, bands, window, xsize, ysize): """Get the outshape of a window. this method is only used inside get_window to calculate the out_shape """ if xsize and ysize is None: ratio = window.width / xsize ysize = math.ceil(window.height / ra...
[ "def", "_get_window_out_shape", "(", "self", ",", "bands", ",", "window", ",", "xsize", ",", "ysize", ")", ":", "if", "xsize", "and", "ysize", "is", "None", ":", "ratio", "=", "window", ".", "width", "/", "xsize", "ysize", "=", "math", ".", "ceil", "...
Get the outshape of a window. this method is only used inside get_window to calculate the out_shape
[ "Get", "the", "outshape", "of", "a", "window", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/georaster.py#L1796-L1811
train
satellogic/telluric
telluric/georaster.py
GeoRaster2._read_with_mask
def _read_with_mask(raster, masked): """ returns if we should read from rasterio using the masked """ if masked is None: mask_flags = raster.mask_flag_enums per_dataset_mask = all([rasterio.enums.MaskFlags.per_dataset in flags for flags in mask_flags]) masked ...
python
def _read_with_mask(raster, masked): """ returns if we should read from rasterio using the masked """ if masked is None: mask_flags = raster.mask_flag_enums per_dataset_mask = all([rasterio.enums.MaskFlags.per_dataset in flags for flags in mask_flags]) masked ...
[ "def", "_read_with_mask", "(", "raster", ",", "masked", ")", ":", "if", "masked", "is", "None", ":", "mask_flags", "=", "raster", ".", "mask_flag_enums", "per_dataset_mask", "=", "all", "(", "[", "rasterio", ".", "enums", ".", "MaskFlags", ".", "per_dataset"...
returns if we should read from rasterio using the masked
[ "returns", "if", "we", "should", "read", "from", "rasterio", "using", "the", "masked" ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/georaster.py#L1814-L1821
train
satellogic/telluric
telluric/georaster.py
GeoRaster2.get_window
def get_window(self, window, bands=None, xsize=None, ysize=None, resampling=Resampling.cubic, masked=None, affine=None ): """Get window from raster. :param window: requested window :param bands: list of indices of requested bads, default ...
python
def get_window(self, window, bands=None, xsize=None, ysize=None, resampling=Resampling.cubic, masked=None, affine=None ): """Get window from raster. :param window: requested window :param bands: list of indices of requested bads, default ...
[ "def", "get_window", "(", "self", ",", "window", ",", "bands", "=", "None", ",", "xsize", "=", "None", ",", "ysize", "=", "None", ",", "resampling", "=", "Resampling", ".", "cubic", ",", "masked", "=", "None", ",", "affine", "=", "None", ")", ":", ...
Get window from raster. :param window: requested window :param bands: list of indices of requested bads, default None which returns all bands :param xsize: tile x size default None, for full resolution pass None :param ysize: tile y size default None, for full resolution pass None ...
[ "Get", "window", "from", "raster", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/georaster.py#L1823-L1862
train
satellogic/telluric
telluric/georaster.py
GeoRaster2._get_tile_when_web_mercator_crs
def _get_tile_when_web_mercator_crs(self, x_tile, y_tile, zoom, bands=None, masked=None, resampling=Resampling.cubic): """ The reason we want to treat this case in a special way is that there are cases where the rater is...
python
def _get_tile_when_web_mercator_crs(self, x_tile, y_tile, zoom, bands=None, masked=None, resampling=Resampling.cubic): """ The reason we want to treat this case in a special way is that there are cases where the rater is...
[ "def", "_get_tile_when_web_mercator_crs", "(", "self", ",", "x_tile", ",", "y_tile", ",", "zoom", ",", "bands", "=", "None", ",", "masked", "=", "None", ",", "resampling", "=", "Resampling", ".", "cubic", ")", ":", "roi", "=", "GeoVector", ".", "from_xyz",...
The reason we want to treat this case in a special way is that there are cases where the rater is aligned so you need to be precise on which raster you want
[ "The", "reason", "we", "want", "to", "treat", "this", "case", "in", "a", "special", "way", "is", "that", "there", "are", "cases", "where", "the", "rater", "is", "aligned", "so", "you", "need", "to", "be", "precise", "on", "which", "raster", "you", "wan...
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/georaster.py#L1864-L1887
train
satellogic/telluric
telluric/georaster.py
GeoRaster2.get_tile
def get_tile(self, x_tile, y_tile, zoom, bands=None, masked=None, resampling=Resampling.cubic): """Convert mercator tile to raster window. :param x_tile: x coordinate of tile :param y_tile: y coordinate of tile :param zoom: zoom level :param bands: list of indic...
python
def get_tile(self, x_tile, y_tile, zoom, bands=None, masked=None, resampling=Resampling.cubic): """Convert mercator tile to raster window. :param x_tile: x coordinate of tile :param y_tile: y coordinate of tile :param zoom: zoom level :param bands: list of indic...
[ "def", "get_tile", "(", "self", ",", "x_tile", ",", "y_tile", ",", "zoom", ",", "bands", "=", "None", ",", "masked", "=", "None", ",", "resampling", "=", "Resampling", ".", "cubic", ")", ":", "if", "self", ".", "crs", "==", "WEB_MERCATOR_CRS", ":", "...
Convert mercator tile to raster window. :param x_tile: x coordinate of tile :param y_tile: y coordinate of tile :param zoom: zoom level :param bands: list of indices of requested bands, default None which returns all bands :param resampling: reprojection resampling method, defau...
[ "Convert", "mercator", "tile", "to", "raster", "window", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/georaster.py#L1889-L1922
train
satellogic/telluric
telluric/georaster.py
GeoRaster2.colorize
def colorize(self, colormap, band_name=None, vmin=None, vmax=None): """Apply a colormap on a selected band. colormap list: https://matplotlib.org/examples/color/colormaps_reference.html Parameters ---------- colormap : str Colormap name from this list https://matplotlib...
python
def colorize(self, colormap, band_name=None, vmin=None, vmax=None): """Apply a colormap on a selected band. colormap list: https://matplotlib.org/examples/color/colormaps_reference.html Parameters ---------- colormap : str Colormap name from this list https://matplotlib...
[ "def", "colorize", "(", "self", ",", "colormap", ",", "band_name", "=", "None", ",", "vmin", "=", "None", ",", "vmax", "=", "None", ")", ":", "vmin", "=", "vmin", "if", "vmin", "is", "not", "None", "else", "min", "(", "self", ".", "min", "(", ")"...
Apply a colormap on a selected band. colormap list: https://matplotlib.org/examples/color/colormaps_reference.html Parameters ---------- colormap : str Colormap name from this list https://matplotlib.org/examples/color/colormaps_reference.html band_name : str, optional...
[ "Apply", "a", "colormap", "on", "a", "selected", "band", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/georaster.py#L1933-L1986
train
satellogic/telluric
telluric/georaster.py
GeoRaster2.chunks
def chunks(self, shape=256, pad=False): """This method returns GeoRaster chunks out of the original raster. The chunck is evaluated only when fetched from the iterator. Useful when you want to iterate over a big rasters. Parameters ---------- shape : int or tuple, optio...
python
def chunks(self, shape=256, pad=False): """This method returns GeoRaster chunks out of the original raster. The chunck is evaluated only when fetched from the iterator. Useful when you want to iterate over a big rasters. Parameters ---------- shape : int or tuple, optio...
[ "def", "chunks", "(", "self", ",", "shape", "=", "256", ",", "pad", "=", "False", ")", ":", "_self", "=", "self", ".", "_raster_backed_by_a_file", "(", ")", "if", "isinstance", "(", "shape", ",", "int", ")", ":", "shape", "=", "(", "shape", ",", "s...
This method returns GeoRaster chunks out of the original raster. The chunck is evaluated only when fetched from the iterator. Useful when you want to iterate over a big rasters. Parameters ---------- shape : int or tuple, optional The shape of the chunk. Default: 25...
[ "This", "method", "returns", "GeoRaster", "chunks", "out", "of", "the", "original", "raster", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/georaster.py#L1998-L2048
train
satellogic/telluric
telluric/collections.py
dissolve
def dissolve(collection, aggfunc=None): # type: (BaseCollection, Optional[Callable[[list], Any]]) -> GeoFeature """Dissolves features contained in a FeatureCollection and applies an aggregation function to its properties. """ new_properties = {} if aggfunc: temp_properties = defaultdict...
python
def dissolve(collection, aggfunc=None): # type: (BaseCollection, Optional[Callable[[list], Any]]) -> GeoFeature """Dissolves features contained in a FeatureCollection and applies an aggregation function to its properties. """ new_properties = {} if aggfunc: temp_properties = defaultdict...
[ "def", "dissolve", "(", "collection", ",", "aggfunc", "=", "None", ")", ":", "# type: (BaseCollection, Optional[Callable[[list], Any]]) -> GeoFeature", "new_properties", "=", "{", "}", "if", "aggfunc", ":", "temp_properties", "=", "defaultdict", "(", "list", ")", "# t...
Dissolves features contained in a FeatureCollection and applies an aggregation function to its properties.
[ "Dissolves", "features", "contained", "in", "a", "FeatureCollection", "and", "applies", "an", "aggregation", "function", "to", "its", "properties", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/collections.py#L34-L55
train
satellogic/telluric
telluric/collections.py
BaseCollection.filter
def filter(self, intersects): """Filter results that intersect a given GeoFeature or Vector. """ try: crs = self.crs vector = intersects.geometry if isinstance(intersects, GeoFeature) else intersects prepared_shape = prep(vector.get_shape(crs)) hi...
python
def filter(self, intersects): """Filter results that intersect a given GeoFeature or Vector. """ try: crs = self.crs vector = intersects.geometry if isinstance(intersects, GeoFeature) else intersects prepared_shape = prep(vector.get_shape(crs)) hi...
[ "def", "filter", "(", "self", ",", "intersects", ")", ":", "try", ":", "crs", "=", "self", ".", "crs", "vector", "=", "intersects", ".", "geometry", "if", "isinstance", "(", "intersects", ",", "GeoFeature", ")", "else", "intersects", "prepared_shape", "=",...
Filter results that intersect a given GeoFeature or Vector.
[ "Filter", "results", "that", "intersect", "a", "given", "GeoFeature", "or", "Vector", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/collections.py#L137-L155
train
satellogic/telluric
telluric/collections.py
BaseCollection.sort
def sort(self, by, desc=False): """Sorts by given property or function, ascending or descending order. Parameters ---------- by : str or callable If string, property by which to sort. If callable, it should receive a GeoFeature a return a value by which to sort. ...
python
def sort(self, by, desc=False): """Sorts by given property or function, ascending or descending order. Parameters ---------- by : str or callable If string, property by which to sort. If callable, it should receive a GeoFeature a return a value by which to sort. ...
[ "def", "sort", "(", "self", ",", "by", ",", "desc", "=", "False", ")", ":", "if", "callable", "(", "by", ")", ":", "key", "=", "by", "else", ":", "def", "key", "(", "feature", ")", ":", "return", "feature", "[", "by", "]", "sorted_features", "=",...
Sorts by given property or function, ascending or descending order. Parameters ---------- by : str or callable If string, property by which to sort. If callable, it should receive a GeoFeature a return a value by which to sort. desc : bool, optional D...
[ "Sorts", "by", "given", "property", "or", "function", "ascending", "or", "descending", "order", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/collections.py#L157-L176
train
satellogic/telluric
telluric/collections.py
BaseCollection.groupby
def groupby(self, by): # type: (Union[str, Callable[[GeoFeature], str]]) -> _CollectionGroupBy """Groups collection using a value of a property. Parameters ---------- by : str or callable If string, name of the property by which to group. If callable, sho...
python
def groupby(self, by): # type: (Union[str, Callable[[GeoFeature], str]]) -> _CollectionGroupBy """Groups collection using a value of a property. Parameters ---------- by : str or callable If string, name of the property by which to group. If callable, sho...
[ "def", "groupby", "(", "self", ",", "by", ")", ":", "# type: (Union[str, Callable[[GeoFeature], str]]) -> _CollectionGroupBy", "results", "=", "OrderedDict", "(", ")", "# type: OrderedDict[str, list]", "for", "feature", "in", "self", ":", "if", "callable", "(", "by", ...
Groups collection using a value of a property. Parameters ---------- by : str or callable If string, name of the property by which to group. If callable, should receive a GeoFeature and return the category. Returns ------- _CollectionGroupBy
[ "Groups", "collection", "using", "a", "value", "of", "a", "property", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/collections.py#L178-L207
train
satellogic/telluric
telluric/collections.py
BaseCollection.dissolve
def dissolve(self, by=None, aggfunc=None): # type: (Optional[str], Optional[Callable]) -> FeatureCollection """Dissolve geometries and rasters within `groupby`. """ if by: agg = partial(dissolve, aggfunc=aggfunc) # type: Callable[[BaseCollection], GeoFeature] re...
python
def dissolve(self, by=None, aggfunc=None): # type: (Optional[str], Optional[Callable]) -> FeatureCollection """Dissolve geometries and rasters within `groupby`. """ if by: agg = partial(dissolve, aggfunc=aggfunc) # type: Callable[[BaseCollection], GeoFeature] re...
[ "def", "dissolve", "(", "self", ",", "by", "=", "None", ",", "aggfunc", "=", "None", ")", ":", "# type: (Optional[str], Optional[Callable]) -> FeatureCollection", "if", "by", ":", "agg", "=", "partial", "(", "dissolve", ",", "aggfunc", "=", "aggfunc", ")", "# ...
Dissolve geometries and rasters within `groupby`.
[ "Dissolve", "geometries", "and", "rasters", "within", "groupby", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/collections.py#L209-L219
train
satellogic/telluric
telluric/collections.py
BaseCollection.rasterize
def rasterize(self, dest_resolution, *, polygonize_width=0, crs=WEB_MERCATOR_CRS, fill_value=None, bounds=None, dtype=None, **polygonize_kwargs): """Binarize a FeatureCollection and produce a raster with the target resolution. Parameters ---------- dest_resolution: flo...
python
def rasterize(self, dest_resolution, *, polygonize_width=0, crs=WEB_MERCATOR_CRS, fill_value=None, bounds=None, dtype=None, **polygonize_kwargs): """Binarize a FeatureCollection and produce a raster with the target resolution. Parameters ---------- dest_resolution: flo...
[ "def", "rasterize", "(", "self", ",", "dest_resolution", ",", "*", ",", "polygonize_width", "=", "0", ",", "crs", "=", "WEB_MERCATOR_CRS", ",", "fill_value", "=", "None", ",", "bounds", "=", "None", ",", "dtype", "=", "None", ",", "*", "*", "polygonize_k...
Binarize a FeatureCollection and produce a raster with the target resolution. Parameters ---------- dest_resolution: float Resolution in units of the CRS. polygonize_width : int, optional Width for the polygonized features (lines and points) in pixels, default to...
[ "Binarize", "a", "FeatureCollection", "and", "produce", "a", "raster", "with", "the", "target", "resolution", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/collections.py#L227-L306
train
satellogic/telluric
telluric/collections.py
BaseCollection.save
def save(self, filename, driver=None, schema=None): """Saves collection to file. """ if driver is None: driver = DRIVERS.get(os.path.splitext(filename)[-1]) if schema is None: schema = self.schema if driver == "GeoJSON": # Workaround for htt...
python
def save(self, filename, driver=None, schema=None): """Saves collection to file. """ if driver is None: driver = DRIVERS.get(os.path.splitext(filename)[-1]) if schema is None: schema = self.schema if driver == "GeoJSON": # Workaround for htt...
[ "def", "save", "(", "self", ",", "filename", ",", "driver", "=", "None", ",", "schema", "=", "None", ")", ":", "if", "driver", "is", "None", ":", "driver", "=", "DRIVERS", ".", "get", "(", "os", ".", "path", ".", "splitext", "(", "filename", ")", ...
Saves collection to file.
[ "Saves", "collection", "to", "file", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/collections.py#L311-L334
train
satellogic/telluric
telluric/collections.py
BaseCollection.apply
def apply(self, **kwargs): """Return a new FeatureCollection with the results of applying the statements in the arguments to each element. """ def _apply(f): properties = copy.deepcopy(f.properties) for prop, value in kwargs.items(): if callable(value): ...
python
def apply(self, **kwargs): """Return a new FeatureCollection with the results of applying the statements in the arguments to each element. """ def _apply(f): properties = copy.deepcopy(f.properties) for prop, value in kwargs.items(): if callable(value): ...
[ "def", "apply", "(", "self", ",", "*", "*", "kwargs", ")", ":", "def", "_apply", "(", "f", ")", ":", "properties", "=", "copy", ".", "deepcopy", "(", "f", ".", "properties", ")", "for", "prop", ",", "value", "in", "kwargs", ".", "items", "(", ")"...
Return a new FeatureCollection with the results of applying the statements in the arguments to each element.
[ "Return", "a", "new", "FeatureCollection", "with", "the", "results", "of", "applying", "the", "statements", "in", "the", "arguments", "to", "each", "element", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/collections.py#L341-L363
train
satellogic/telluric
telluric/collections.py
FeatureCollection.validate
def validate(self): """ if schema exists we run shape file validation code of fiona by trying to save to in MemoryFile """ if self._schema is not None: with MemoryFile() as memfile: with memfile.open(driver="ESRI Shapefile", schema=self.schema) as target: ...
python
def validate(self): """ if schema exists we run shape file validation code of fiona by trying to save to in MemoryFile """ if self._schema is not None: with MemoryFile() as memfile: with memfile.open(driver="ESRI Shapefile", schema=self.schema) as target: ...
[ "def", "validate", "(", "self", ")", ":", "if", "self", ".", "_schema", "is", "not", "None", ":", "with", "MemoryFile", "(", ")", "as", "memfile", ":", "with", "memfile", ".", "open", "(", "driver", "=", "\"ESRI Shapefile\"", ",", "schema", "=", "self"...
if schema exists we run shape file validation code of fiona by trying to save to in MemoryFile
[ "if", "schema", "exists", "we", "run", "shape", "file", "validation", "code", "of", "fiona", "by", "trying", "to", "save", "to", "in", "MemoryFile" ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/collections.py#L386-L396
train
satellogic/telluric
telluric/collections.py
FileCollection.open
def open(cls, filename, crs=None): """Creates a FileCollection from a file in disk. Parameters ---------- filename : str Path of the file to read. crs : CRS overrides the crs of the collection, this funtion will not reprojects """ with fi...
python
def open(cls, filename, crs=None): """Creates a FileCollection from a file in disk. Parameters ---------- filename : str Path of the file to read. crs : CRS overrides the crs of the collection, this funtion will not reprojects """ with fi...
[ "def", "open", "(", "cls", ",", "filename", ",", "crs", "=", "None", ")", ":", "with", "fiona", ".", "Env", "(", ")", ":", "with", "fiona", ".", "open", "(", "filename", ",", "'r'", ")", "as", "source", ":", "original_crs", "=", "CRS", "(", "sour...
Creates a FileCollection from a file in disk. Parameters ---------- filename : str Path of the file to read. crs : CRS overrides the crs of the collection, this funtion will not reprojects
[ "Creates", "a", "FileCollection", "from", "a", "file", "in", "disk", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/collections.py#L524-L542
train
satellogic/telluric
telluric/collections.py
_CollectionGroupBy.filter
def filter(self, func): # type: (Callable[[BaseCollection], bool]) -> _CollectionGroupBy """Filter out Groups based on filtering function. The function should get a FeatureCollection and return True to leave in the Group and False to take it out. """ results = OrderedDict() # t...
python
def filter(self, func): # type: (Callable[[BaseCollection], bool]) -> _CollectionGroupBy """Filter out Groups based on filtering function. The function should get a FeatureCollection and return True to leave in the Group and False to take it out. """ results = OrderedDict() # t...
[ "def", "filter", "(", "self", ",", "func", ")", ":", "# type: (Callable[[BaseCollection], bool]) -> _CollectionGroupBy", "results", "=", "OrderedDict", "(", ")", "# type: OrderedDict", "for", "name", ",", "group", "in", "self", ":", "if", "func", "(", "group", ")"...
Filter out Groups based on filtering function. The function should get a FeatureCollection and return True to leave in the Group and False to take it out.
[ "Filter", "out", "Groups", "based", "on", "filtering", "function", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/collections.py#L636-L647
train
satellogic/telluric
telluric/context.py
reset_context
def reset_context(**options): """Reset context to default.""" local_context._options = {} local_context._options.update(options) log.debug("New TelluricContext context %r created", local_context._options)
python
def reset_context(**options): """Reset context to default.""" local_context._options = {} local_context._options.update(options) log.debug("New TelluricContext context %r created", local_context._options)
[ "def", "reset_context", "(", "*", "*", "options", ")", ":", "local_context", ".", "_options", "=", "{", "}", "local_context", ".", "_options", ".", "update", "(", "options", ")", "log", ".", "debug", "(", "\"New TelluricContext context %r created\"", ",", "loc...
Reset context to default.
[ "Reset", "context", "to", "default", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/context.py#L131-L135
train
satellogic/telluric
telluric/context.py
get_context
def get_context(): """Get a mapping of current options.""" if not local_context._options: raise TelluricContextError("TelluricContext context not exists") else: log.debug("Got a copy of context %r options", local_context._options) return local_context._options.copy()
python
def get_context(): """Get a mapping of current options.""" if not local_context._options: raise TelluricContextError("TelluricContext context not exists") else: log.debug("Got a copy of context %r options", local_context._options) return local_context._options.copy()
[ "def", "get_context", "(", ")", ":", "if", "not", "local_context", ".", "_options", ":", "raise", "TelluricContextError", "(", "\"TelluricContext context not exists\"", ")", "else", ":", "log", ".", "debug", "(", "\"Got a copy of context %r options\"", ",", "local_con...
Get a mapping of current options.
[ "Get", "a", "mapping", "of", "current", "options", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/context.py#L138-L144
train
satellogic/telluric
telluric/context.py
set_context
def set_context(**options): """Set options in the existing context.""" if not local_context._options: raise TelluricContextError("TelluricContext context not exists") else: local_context._options.update(options) log.debug("Updated existing %r with options %r", local_context._options,...
python
def set_context(**options): """Set options in the existing context.""" if not local_context._options: raise TelluricContextError("TelluricContext context not exists") else: local_context._options.update(options) log.debug("Updated existing %r with options %r", local_context._options,...
[ "def", "set_context", "(", "*", "*", "options", ")", ":", "if", "not", "local_context", ".", "_options", ":", "raise", "TelluricContextError", "(", "\"TelluricContext context not exists\"", ")", "else", ":", "local_context", ".", "_options", ".", "update", "(", ...
Set options in the existing context.
[ "Set", "options", "in", "the", "existing", "context", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/context.py#L147-L153
train
satellogic/telluric
telluric/features.py
transform_properties
def transform_properties(properties, schema): """Transform properties types according to a schema. Parameters ---------- properties : dict Properties to transform. schema : dict Fiona schema containing the types. """ new_properties = properties.copy() for prop_value, (p...
python
def transform_properties(properties, schema): """Transform properties types according to a schema. Parameters ---------- properties : dict Properties to transform. schema : dict Fiona schema containing the types. """ new_properties = properties.copy() for prop_value, (p...
[ "def", "transform_properties", "(", "properties", ",", "schema", ")", ":", "new_properties", "=", "properties", ".", "copy", "(", ")", "for", "prop_value", ",", "(", "prop_name", ",", "prop_type", ")", "in", "zip", "(", "new_properties", ".", "values", "(", ...
Transform properties types according to a schema. Parameters ---------- properties : dict Properties to transform. schema : dict Fiona schema containing the types.
[ "Transform", "properties", "types", "according", "to", "a", "schema", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/features.py#L22-L44
train
satellogic/telluric
telluric/features.py
serialize_properties
def serialize_properties(properties): """Serialize properties. Parameters ---------- properties : dict Properties to serialize. """ new_properties = properties.copy() for attr_name, attr_value in new_properties.items(): if isinstance(attr_value, datetime): new_p...
python
def serialize_properties(properties): """Serialize properties. Parameters ---------- properties : dict Properties to serialize. """ new_properties = properties.copy() for attr_name, attr_value in new_properties.items(): if isinstance(attr_value, datetime): new_p...
[ "def", "serialize_properties", "(", "properties", ")", ":", "new_properties", "=", "properties", ".", "copy", "(", ")", "for", "attr_name", ",", "attr_value", "in", "new_properties", ".", "items", "(", ")", ":", "if", "isinstance", "(", "attr_value", ",", "d...
Serialize properties. Parameters ---------- properties : dict Properties to serialize.
[ "Serialize", "properties", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/features.py#L47-L65
train
satellogic/telluric
telluric/features.py
GeoFeature.from_record
def from_record(cls, record, crs, schema=None): """Create GeoFeature from a record.""" properties = cls._to_properties(record, schema) vector = GeoVector(shape(record['geometry']), crs) if record.get('raster'): assets = {k: dict(type=RASTER_TYPE, product='visual', **v) for k,...
python
def from_record(cls, record, crs, schema=None): """Create GeoFeature from a record.""" properties = cls._to_properties(record, schema) vector = GeoVector(shape(record['geometry']), crs) if record.get('raster'): assets = {k: dict(type=RASTER_TYPE, product='visual', **v) for k,...
[ "def", "from_record", "(", "cls", ",", "record", ",", "crs", ",", "schema", "=", "None", ")", ":", "properties", "=", "cls", ".", "_to_properties", "(", "record", ",", "schema", ")", "vector", "=", "GeoVector", "(", "shape", "(", "record", "[", "'geome...
Create GeoFeature from a record.
[ "Create", "GeoFeature", "from", "a", "record", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/features.py#L126-L134
train
satellogic/telluric
telluric/features.py
GeoFeature.copy_with
def copy_with(self, geometry=None, properties=None, assets=None): """Generate a new GeoFeature with different geometry or preperties.""" def copy_assets_object(asset): obj = asset.get("__object") if hasattr("copy", obj): new_obj = obj.copy() if obj: ...
python
def copy_with(self, geometry=None, properties=None, assets=None): """Generate a new GeoFeature with different geometry or preperties.""" def copy_assets_object(asset): obj = asset.get("__object") if hasattr("copy", obj): new_obj = obj.copy() if obj: ...
[ "def", "copy_with", "(", "self", ",", "geometry", "=", "None", ",", "properties", "=", "None", ",", "assets", "=", "None", ")", ":", "def", "copy_assets_object", "(", "asset", ")", ":", "obj", "=", "asset", ".", "get", "(", "\"__object\"", ")", "if", ...
Generate a new GeoFeature with different geometry or preperties.
[ "Generate", "a", "new", "GeoFeature", "with", "different", "geometry", "or", "preperties", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/features.py#L262-L280
train
satellogic/telluric
telluric/features.py
GeoFeature.from_raster
def from_raster(cls, raster, properties, product='visual'): """Initialize a GeoFeature object with a GeoRaster Parameters ---------- raster : GeoRaster the raster in the feature properties : dict Properties. product : str product assoc...
python
def from_raster(cls, raster, properties, product='visual'): """Initialize a GeoFeature object with a GeoRaster Parameters ---------- raster : GeoRaster the raster in the feature properties : dict Properties. product : str product assoc...
[ "def", "from_raster", "(", "cls", ",", "raster", ",", "properties", ",", "product", "=", "'visual'", ")", ":", "footprint", "=", "raster", ".", "footprint", "(", ")", "assets", "=", "raster", ".", "to_assets", "(", "product", "=", "product", ")", "return...
Initialize a GeoFeature object with a GeoRaster Parameters ---------- raster : GeoRaster the raster in the feature properties : dict Properties. product : str product associated to the raster
[ "Initialize", "a", "GeoFeature", "object", "with", "a", "GeoRaster" ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/features.py#L287-L301
train
satellogic/telluric
telluric/features.py
GeoFeature.has_raster
def has_raster(self): """True if any of the assets is type 'raster'.""" return any(asset.get('type') == RASTER_TYPE for asset in self.assets.values())
python
def has_raster(self): """True if any of the assets is type 'raster'.""" return any(asset.get('type') == RASTER_TYPE for asset in self.assets.values())
[ "def", "has_raster", "(", "self", ")", ":", "return", "any", "(", "asset", ".", "get", "(", "'type'", ")", "==", "RASTER_TYPE", "for", "asset", "in", "self", ".", "assets", ".", "values", "(", ")", ")" ]
True if any of the assets is type 'raster'.
[ "True", "if", "any", "of", "the", "assets", "is", "type", "raster", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/features.py#L304-L306
train
satellogic/telluric
telluric/util/projections.py
transform
def transform(shape, source_crs, destination_crs=None, src_affine=None, dst_affine=None): """Transforms shape from one CRS to another. Parameters ---------- shape : shapely.geometry.base.BaseGeometry Shape to transform. source_crs : dict or str Source CRS in the form of key/value pa...
python
def transform(shape, source_crs, destination_crs=None, src_affine=None, dst_affine=None): """Transforms shape from one CRS to another. Parameters ---------- shape : shapely.geometry.base.BaseGeometry Shape to transform. source_crs : dict or str Source CRS in the form of key/value pa...
[ "def", "transform", "(", "shape", ",", "source_crs", ",", "destination_crs", "=", "None", ",", "src_affine", "=", "None", ",", "dst_affine", "=", "None", ")", ":", "if", "destination_crs", "is", "None", ":", "destination_crs", "=", "WGS84_CRS", "if", "src_af...
Transforms shape from one CRS to another. Parameters ---------- shape : shapely.geometry.base.BaseGeometry Shape to transform. source_crs : dict or str Source CRS in the form of key/value pairs or proj4 string. destination_crs : dict or str, optional Destination CRS, EPSG:43...
[ "Transforms", "shape", "from", "one", "CRS", "to", "another", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/util/projections.py#L24-L57
train
satellogic/telluric
telluric/plotting.py
simple_plot
def simple_plot(feature, *, mp=None, **map_kwargs): """Plots a GeoVector in a simple Folium map. For more complex and customizable plots using Jupyter widgets, use the plot function instead. Parameters ---------- feature : telluric.vectors.GeoVector, telluric.features.GeoFeature, telluric.coll...
python
def simple_plot(feature, *, mp=None, **map_kwargs): """Plots a GeoVector in a simple Folium map. For more complex and customizable plots using Jupyter widgets, use the plot function instead. Parameters ---------- feature : telluric.vectors.GeoVector, telluric.features.GeoFeature, telluric.coll...
[ "def", "simple_plot", "(", "feature", ",", "*", ",", "mp", "=", "None", ",", "*", "*", "map_kwargs", ")", ":", "# This import is here to avoid cyclic references", "from", "telluric", ".", "collections", "import", "BaseCollection", "if", "mp", "is", "None", ":", ...
Plots a GeoVector in a simple Folium map. For more complex and customizable plots using Jupyter widgets, use the plot function instead. Parameters ---------- feature : telluric.vectors.GeoVector, telluric.features.GeoFeature, telluric.collections.BaseCollection Data to plot.
[ "Plots", "a", "GeoVector", "in", "a", "simple", "Folium", "map", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/plotting.py#L24-L53
train
satellogic/telluric
telluric/plotting.py
zoom_level_from_geometry
def zoom_level_from_geometry(geometry, splits=4): """Generate optimum zoom level for geometry. Notes ----- The obvious solution would be >>> mercantile.bounding_tile(*geometry.get_shape(WGS84_CRS).bounds).z However, if the geometry is split between two or four tiles, the resulting zoom le...
python
def zoom_level_from_geometry(geometry, splits=4): """Generate optimum zoom level for geometry. Notes ----- The obvious solution would be >>> mercantile.bounding_tile(*geometry.get_shape(WGS84_CRS).bounds).z However, if the geometry is split between two or four tiles, the resulting zoom le...
[ "def", "zoom_level_from_geometry", "(", "geometry", ",", "splits", "=", "4", ")", ":", "# This import is here to avoid cyclic references", "from", "telluric", ".", "vectors", "import", "generate_tile_coordinates", "# We split the geometry and compute the zoom level for each chunk",...
Generate optimum zoom level for geometry. Notes ----- The obvious solution would be >>> mercantile.bounding_tile(*geometry.get_shape(WGS84_CRS).bounds).z However, if the geometry is split between two or four tiles, the resulting zoom level might be too big.
[ "Generate", "optimum", "zoom", "level", "for", "geometry", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/plotting.py#L56-L79
train
satellogic/telluric
telluric/plotting.py
layer_from_element
def layer_from_element(element, style_function=None): """Return Leaflet layer from shape. Parameters ---------- element : telluric.vectors.GeoVector, telluric.features.GeoFeature, telluric.collections.BaseCollection Data to plot. """ # This import is here to avoid cyclic references ...
python
def layer_from_element(element, style_function=None): """Return Leaflet layer from shape. Parameters ---------- element : telluric.vectors.GeoVector, telluric.features.GeoFeature, telluric.collections.BaseCollection Data to plot. """ # This import is here to avoid cyclic references ...
[ "def", "layer_from_element", "(", "element", ",", "style_function", "=", "None", ")", ":", "# This import is here to avoid cyclic references", "from", "telluric", ".", "collections", "import", "BaseCollection", "if", "isinstance", "(", "element", ",", "BaseCollection", ...
Return Leaflet layer from shape. Parameters ---------- element : telluric.vectors.GeoVector, telluric.features.GeoFeature, telluric.collections.BaseCollection Data to plot.
[ "Return", "Leaflet", "layer", "from", "shape", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/plotting.py#L96-L114
train
satellogic/telluric
telluric/plotting.py
plot
def plot(feature, mp=None, style_function=None, **map_kwargs): """Plots a GeoVector in an ipyleaflet map. Parameters ---------- feature : telluric.vectors.GeoVector, telluric.features.GeoFeature, telluric.collections.BaseCollection Data to plot. mp : ipyleaflet.Map, optional Map in ...
python
def plot(feature, mp=None, style_function=None, **map_kwargs): """Plots a GeoVector in an ipyleaflet map. Parameters ---------- feature : telluric.vectors.GeoVector, telluric.features.GeoFeature, telluric.collections.BaseCollection Data to plot. mp : ipyleaflet.Map, optional Map in ...
[ "def", "plot", "(", "feature", ",", "mp", "=", "None", ",", "style_function", "=", "None", ",", "*", "*", "map_kwargs", ")", ":", "map_kwargs", ".", "setdefault", "(", "'basemap'", ",", "basemaps", ".", "Stamen", ".", "Terrain", ")", "if", "feature", "...
Plots a GeoVector in an ipyleaflet map. Parameters ---------- feature : telluric.vectors.GeoVector, telluric.features.GeoFeature, telluric.collections.BaseCollection Data to plot. mp : ipyleaflet.Map, optional Map in which to plot, default to None (creates a new one). style_function...
[ "Plots", "a", "GeoVector", "in", "an", "ipyleaflet", "map", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/plotting.py#L117-L146
train
satellogic/telluric
telluric/util/tileserver_utils.py
tileserver_optimized_raster
def tileserver_optimized_raster(src, dest): """ This method converts a raster to a tileserver optimized raster. The method will reproject the raster to align to the xyz system, in resolution and projection It will also create overviews And finally it will arragne the raster in a cog way. ...
python
def tileserver_optimized_raster(src, dest): """ This method converts a raster to a tileserver optimized raster. The method will reproject the raster to align to the xyz system, in resolution and projection It will also create overviews And finally it will arragne the raster in a cog way. ...
[ "def", "tileserver_optimized_raster", "(", "src", ",", "dest", ")", ":", "src_raster", "=", "tl", ".", "GeoRaster2", ".", "open", "(", "src", ")", "bounding_box", "=", "src_raster", ".", "footprint", "(", ")", ".", "get_shape", "(", "tl", ".", "constants",...
This method converts a raster to a tileserver optimized raster. The method will reproject the raster to align to the xyz system, in resolution and projection It will also create overviews And finally it will arragne the raster in a cog way. You could take the dest file upload it to a web...
[ "This", "method", "converts", "a", "raster", "to", "a", "tileserver", "optimized", "raster", ".", "The", "method", "will", "reproject", "the", "raster", "to", "align", "to", "the", "xyz", "system", "in", "resolution", "and", "projection", "It", "will", "also...
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/util/tileserver_utils.py#L20-L58
train
satellogic/telluric
telluric/vectors.py
get_dimension
def get_dimension(geometry): """Gets the dimension of a Fiona-like geometry element.""" coordinates = geometry["coordinates"] type_ = geometry["type"] if type_ in ('Point',): return len(coordinates) elif type_ in ('LineString', 'MultiPoint'): return len(coordinates[0]) elif type_...
python
def get_dimension(geometry): """Gets the dimension of a Fiona-like geometry element.""" coordinates = geometry["coordinates"] type_ = geometry["type"] if type_ in ('Point',): return len(coordinates) elif type_ in ('LineString', 'MultiPoint'): return len(coordinates[0]) elif type_...
[ "def", "get_dimension", "(", "geometry", ")", ":", "coordinates", "=", "geometry", "[", "\"coordinates\"", "]", "type_", "=", "geometry", "[", "\"type\"", "]", "if", "type_", "in", "(", "'Point'", ",", ")", ":", "return", "len", "(", "coordinates", ")", ...
Gets the dimension of a Fiona-like geometry element.
[ "Gets", "the", "dimension", "of", "a", "Fiona", "-", "like", "geometry", "element", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/vectors.py#L82-L95
train
satellogic/telluric
telluric/vectors.py
GeoVector.from_geojson
def from_geojson(cls, filename): """Load vector from geojson.""" with open(filename) as fd: geometry = json.load(fd) if 'type' not in geometry: raise TypeError("%s is not a valid geojson." % (filename,)) return cls(to_shape(geometry), WGS84_CRS)
python
def from_geojson(cls, filename): """Load vector from geojson.""" with open(filename) as fd: geometry = json.load(fd) if 'type' not in geometry: raise TypeError("%s is not a valid geojson." % (filename,)) return cls(to_shape(geometry), WGS84_CRS)
[ "def", "from_geojson", "(", "cls", ",", "filename", ")", ":", "with", "open", "(", "filename", ")", "as", "fd", ":", "geometry", "=", "json", ".", "load", "(", "fd", ")", "if", "'type'", "not", "in", "geometry", ":", "raise", "TypeError", "(", "\"%s ...
Load vector from geojson.
[ "Load", "vector", "from", "geojson", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/vectors.py#L296-L304
train
satellogic/telluric
telluric/vectors.py
GeoVector.to_geojson
def to_geojson(self, filename): """Save vector as geojson.""" with open(filename, 'w') as fd: json.dump(self.to_record(WGS84_CRS), fd)
python
def to_geojson(self, filename): """Save vector as geojson.""" with open(filename, 'w') as fd: json.dump(self.to_record(WGS84_CRS), fd)
[ "def", "to_geojson", "(", "self", ",", "filename", ")", ":", "with", "open", "(", "filename", ",", "'w'", ")", "as", "fd", ":", "json", ".", "dump", "(", "self", ".", "to_record", "(", "WGS84_CRS", ")", ",", "fd", ")" ]
Save vector as geojson.
[ "Save", "vector", "as", "geojson", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/vectors.py#L306-L309
train
satellogic/telluric
telluric/vectors.py
GeoVector.from_bounds
def from_bounds(cls, xmin, ymin, xmax, ymax, crs=DEFAULT_CRS): """Creates GeoVector object from bounds. Parameters ---------- xmin, ymin, xmax, ymax : float Bounds of the GeoVector. Also (east, south, north, west). crs : ~rasterio.crs.CRS, dict Projection...
python
def from_bounds(cls, xmin, ymin, xmax, ymax, crs=DEFAULT_CRS): """Creates GeoVector object from bounds. Parameters ---------- xmin, ymin, xmax, ymax : float Bounds of the GeoVector. Also (east, south, north, west). crs : ~rasterio.crs.CRS, dict Projection...
[ "def", "from_bounds", "(", "cls", ",", "xmin", ",", "ymin", ",", "xmax", ",", "ymax", ",", "crs", "=", "DEFAULT_CRS", ")", ":", "return", "cls", "(", "Polygon", ".", "from_bounds", "(", "xmin", ",", "ymin", ",", "xmax", ",", "ymax", ")", ",", "crs"...
Creates GeoVector object from bounds. Parameters ---------- xmin, ymin, xmax, ymax : float Bounds of the GeoVector. Also (east, south, north, west). crs : ~rasterio.crs.CRS, dict Projection, default to :py:data:`telluric.constants.DEFAULT_CRS`. Examples ...
[ "Creates", "GeoVector", "object", "from", "bounds", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/vectors.py#L328-L347
train
satellogic/telluric
telluric/vectors.py
GeoVector.from_xyz
def from_xyz(cls, x, y, z): """Creates GeoVector from Mercator slippy map values. """ bb = xy_bounds(x, y, z) return cls.from_bounds(xmin=bb.left, ymin=bb.bottom, xmax=bb.right, ymax=bb.top, crs=WEB_MERCATOR_CRS)
python
def from_xyz(cls, x, y, z): """Creates GeoVector from Mercator slippy map values. """ bb = xy_bounds(x, y, z) return cls.from_bounds(xmin=bb.left, ymin=bb.bottom, xmax=bb.right, ymax=bb.top, crs=WEB_MERCATOR_CRS)
[ "def", "from_xyz", "(", "cls", ",", "x", ",", "y", ",", "z", ")", ":", "bb", "=", "xy_bounds", "(", "x", ",", "y", ",", "z", ")", "return", "cls", ".", "from_bounds", "(", "xmin", "=", "bb", ".", "left", ",", "ymin", "=", "bb", ".", "bottom",...
Creates GeoVector from Mercator slippy map values.
[ "Creates", "GeoVector", "from", "Mercator", "slippy", "map", "values", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/vectors.py#L350-L357
train
satellogic/telluric
telluric/vectors.py
GeoVector.cascaded_union
def cascaded_union(cls, vectors, dst_crs, prevalidate=False): # type: (list, CRS, bool) -> GeoVector """Generate a GeoVector from the cascade union of the impute vectors.""" try: shapes = [geometry.get_shape(dst_crs) for geometry in vectors] if prevalidate: ...
python
def cascaded_union(cls, vectors, dst_crs, prevalidate=False): # type: (list, CRS, bool) -> GeoVector """Generate a GeoVector from the cascade union of the impute vectors.""" try: shapes = [geometry.get_shape(dst_crs) for geometry in vectors] if prevalidate: ...
[ "def", "cascaded_union", "(", "cls", ",", "vectors", ",", "dst_crs", ",", "prevalidate", "=", "False", ")", ":", "# type: (list, CRS, bool) -> GeoVector", "try", ":", "shapes", "=", "[", "geometry", ".", "get_shape", "(", "dst_crs", ")", "for", "geometry", "in...
Generate a GeoVector from the cascade union of the impute vectors.
[ "Generate", "a", "GeoVector", "from", "the", "cascade", "union", "of", "the", "impute", "vectors", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/vectors.py#L384-L403
train
satellogic/telluric
telluric/vectors.py
GeoVector.from_record
def from_record(cls, record, crs): """Load vector from record.""" if 'type' not in record: raise TypeError("The data isn't a valid record.") return cls(to_shape(record), crs)
python
def from_record(cls, record, crs): """Load vector from record.""" if 'type' not in record: raise TypeError("The data isn't a valid record.") return cls(to_shape(record), crs)
[ "def", "from_record", "(", "cls", ",", "record", ",", "crs", ")", ":", "if", "'type'", "not", "in", "record", ":", "raise", "TypeError", "(", "\"The data isn't a valid record.\"", ")", "return", "cls", "(", "to_shape", "(", "record", ")", ",", "crs", ")" ]
Load vector from record.
[ "Load", "vector", "from", "record", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/vectors.py#L444-L449
train
satellogic/telluric
telluric/vectors.py
GeoVector.get_bounding_box
def get_bounding_box(self, crs): """Gets bounding box as GeoVector in a specified CRS.""" return self.from_bounds(*self.get_bounds(crs), crs=crs)
python
def get_bounding_box(self, crs): """Gets bounding box as GeoVector in a specified CRS.""" return self.from_bounds(*self.get_bounds(crs), crs=crs)
[ "def", "get_bounding_box", "(", "self", ",", "crs", ")", ":", "return", "self", ".", "from_bounds", "(", "*", "self", ".", "get_bounds", "(", "crs", ")", ",", "crs", "=", "crs", ")" ]
Gets bounding box as GeoVector in a specified CRS.
[ "Gets", "bounding", "box", "as", "GeoVector", "in", "a", "specified", "CRS", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/vectors.py#L464-L466
train
satellogic/telluric
telluric/vectors.py
GeoVector.polygonize
def polygonize(self, width, cap_style_line=CAP_STYLE.flat, cap_style_point=CAP_STYLE.round): """Turns line or point into a buffered polygon.""" shape = self._shape if isinstance(shape, (LineString, MultiLineString)): return self.__class__( shape.buffer(width / 2, cap_...
python
def polygonize(self, width, cap_style_line=CAP_STYLE.flat, cap_style_point=CAP_STYLE.round): """Turns line or point into a buffered polygon.""" shape = self._shape if isinstance(shape, (LineString, MultiLineString)): return self.__class__( shape.buffer(width / 2, cap_...
[ "def", "polygonize", "(", "self", ",", "width", ",", "cap_style_line", "=", "CAP_STYLE", ".", "flat", ",", "cap_style_point", "=", "CAP_STYLE", ".", "round", ")", ":", "shape", "=", "self", ".", "_shape", "if", "isinstance", "(", "shape", ",", "(", "Line...
Turns line or point into a buffered polygon.
[ "Turns", "line", "or", "point", "into", "a", "buffered", "polygon", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/vectors.py#L504-L518
train
satellogic/telluric
telluric/vectors.py
GeoVector.tiles
def tiles(self, zooms, truncate=False): """ Iterator over the tiles intersecting the bounding box of the vector Parameters ---------- zooms : int or sequence of int One or more zoom levels. truncate : bool, optional Whether or not to trunc...
python
def tiles(self, zooms, truncate=False): """ Iterator over the tiles intersecting the bounding box of the vector Parameters ---------- zooms : int or sequence of int One or more zoom levels. truncate : bool, optional Whether or not to trunc...
[ "def", "tiles", "(", "self", ",", "zooms", ",", "truncate", "=", "False", ")", ":", "west", ",", "south", ",", "east", ",", "north", "=", "self", ".", "get_bounds", "(", "WGS84_CRS", ")", "return", "tiles", "(", "west", ",", "south", ",", "east", "...
Iterator over the tiles intersecting the bounding box of the vector Parameters ---------- zooms : int or sequence of int One or more zoom levels. truncate : bool, optional Whether or not to truncate inputs to web mercator limits. Yields -...
[ "Iterator", "over", "the", "tiles", "intersecting", "the", "bounding", "box", "of", "the", "vector" ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/vectors.py#L520-L536
train
satellogic/telluric
telluric/util/raster_utils.py
_join_masks_from_masked_array
def _join_masks_from_masked_array(data): """Union of masks.""" if not isinstance(data.mask, np.ndarray): # workaround to handle mask compressed to single value mask = np.empty(data.data.shape, dtype=np.bool) mask.fill(data.mask) return mask mask = data.mask[0].copy() for ...
python
def _join_masks_from_masked_array(data): """Union of masks.""" if not isinstance(data.mask, np.ndarray): # workaround to handle mask compressed to single value mask = np.empty(data.data.shape, dtype=np.bool) mask.fill(data.mask) return mask mask = data.mask[0].copy() for ...
[ "def", "_join_masks_from_masked_array", "(", "data", ")", ":", "if", "not", "isinstance", "(", "data", ".", "mask", ",", "np", ".", "ndarray", ")", ":", "# workaround to handle mask compressed to single value", "mask", "=", "np", ".", "empty", "(", "data", ".", ...
Union of masks.
[ "Union", "of", "masks", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/util/raster_utils.py#L27-L37
train
satellogic/telluric
telluric/util/raster_utils.py
_creation_options_for_cog
def _creation_options_for_cog(creation_options, source_profile, blocksize): """ it uses the profile of the source raster, override anything using the creation_options and guarantees we will have tiled raster and blocksize """ if not(creation_options): creation_options = {} creation_opti...
python
def _creation_options_for_cog(creation_options, source_profile, blocksize): """ it uses the profile of the source raster, override anything using the creation_options and guarantees we will have tiled raster and blocksize """ if not(creation_options): creation_options = {} creation_opti...
[ "def", "_creation_options_for_cog", "(", "creation_options", ",", "source_profile", ",", "blocksize", ")", ":", "if", "not", "(", "creation_options", ")", ":", "creation_options", "=", "{", "}", "creation_options", "[", "\"blocksize\"", "]", "=", "blocksize", "cre...
it uses the profile of the source raster, override anything using the creation_options and guarantees we will have tiled raster and blocksize
[ "it", "uses", "the", "profile", "of", "the", "source", "raster", "override", "anything", "using", "the", "creation_options", "and", "guarantees", "we", "will", "have", "tiled", "raster", "and", "blocksize" ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/util/raster_utils.py#L70-L84
train
satellogic/telluric
telluric/util/raster_utils.py
convert_to_cog
def convert_to_cog(source_file, destination_file, resampling=rasterio.enums.Resampling.gauss, blocksize=256, overview_blocksize=256, creation_options=None): """Convert source file to a Cloud Optimized GeoTiff new file. :param source_file: path to the original raster :param destination_fi...
python
def convert_to_cog(source_file, destination_file, resampling=rasterio.enums.Resampling.gauss, blocksize=256, overview_blocksize=256, creation_options=None): """Convert source file to a Cloud Optimized GeoTiff new file. :param source_file: path to the original raster :param destination_fi...
[ "def", "convert_to_cog", "(", "source_file", ",", "destination_file", ",", "resampling", "=", "rasterio", ".", "enums", ".", "Resampling", ".", "gauss", ",", "blocksize", "=", "256", ",", "overview_blocksize", "=", "256", ",", "creation_options", "=", "None", ...
Convert source file to a Cloud Optimized GeoTiff new file. :param source_file: path to the original raster :param destination_file: path to the new raster :param resampling: which Resampling to use on reading, default Resampling.gauss :param blocksize: the size of the blocks default 256 :param over...
[ "Convert", "source", "file", "to", "a", "Cloud", "Optimized", "GeoTiff", "new", "file", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/util/raster_utils.py#L87-L119
train
satellogic/telluric
telluric/util/raster_utils.py
warp
def warp(source_file, destination_file, dst_crs=None, resolution=None, dimensions=None, src_bounds=None, dst_bounds=None, src_nodata=None, dst_nodata=None, target_aligned_pixels=False, check_invert_proj=True, creation_options=None, resampling=Resampling.cubic, **kwargs): """Warp a raster ...
python
def warp(source_file, destination_file, dst_crs=None, resolution=None, dimensions=None, src_bounds=None, dst_bounds=None, src_nodata=None, dst_nodata=None, target_aligned_pixels=False, check_invert_proj=True, creation_options=None, resampling=Resampling.cubic, **kwargs): """Warp a raster ...
[ "def", "warp", "(", "source_file", ",", "destination_file", ",", "dst_crs", "=", "None", ",", "resolution", "=", "None", ",", "dimensions", "=", "None", ",", "src_bounds", "=", "None", ",", "dst_bounds", "=", "None", ",", "src_nodata", "=", "None", ",", ...
Warp a raster dataset. Parameters ------------ source_file: str, file object or pathlib.Path object Source file. destination_file: str, file object or pathlib.Path object Destination file. dst_crs: rasterio.crs.CRS, optional Target coordinate reference system. resolution...
[ "Warp", "a", "raster", "dataset", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/util/raster_utils.py#L261-L360
train
satellogic/telluric
telluric/util/raster_utils.py
build_overviews
def build_overviews(source_file, factors=None, minsize=256, external=False, blocksize=256, interleave='pixel', compress='lzw', resampling=Resampling.gauss, **kwargs): """Build overviews at one or more decimation factors for all bands of the dataset. Parameters --...
python
def build_overviews(source_file, factors=None, minsize=256, external=False, blocksize=256, interleave='pixel', compress='lzw', resampling=Resampling.gauss, **kwargs): """Build overviews at one or more decimation factors for all bands of the dataset. Parameters --...
[ "def", "build_overviews", "(", "source_file", ",", "factors", "=", "None", ",", "minsize", "=", "256", ",", "external", "=", "False", ",", "blocksize", "=", "256", ",", "interleave", "=", "'pixel'", ",", "compress", "=", "'lzw'", ",", "resampling", "=", ...
Build overviews at one or more decimation factors for all bands of the dataset. Parameters ------------ source_file : str, file object or pathlib.Path object Source file. factors : list, optional A list of integral overview levels to build. minsize : int, optional Maximu...
[ "Build", "overviews", "at", "one", "or", "more", "decimation", "factors", "for", "all", "bands", "of", "the", "dataset", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/util/raster_utils.py#L363-L411
train
satellogic/telluric
telluric/util/raster_utils.py
build_vrt
def build_vrt(source_file, destination_file, **kwargs): """Make a VRT XML document and write it in file. Parameters ---------- source_file : str, file object or pathlib.Path object Source file. destination_file : str Destination file. kwargs : optional Additional argumen...
python
def build_vrt(source_file, destination_file, **kwargs): """Make a VRT XML document and write it in file. Parameters ---------- source_file : str, file object or pathlib.Path object Source file. destination_file : str Destination file. kwargs : optional Additional argumen...
[ "def", "build_vrt", "(", "source_file", ",", "destination_file", ",", "*", "*", "kwargs", ")", ":", "with", "rasterio", ".", "open", "(", "source_file", ")", "as", "src", ":", "vrt_doc", "=", "boundless_vrt_doc", "(", "src", ",", "*", "*", "kwargs", ")",...
Make a VRT XML document and write it in file. Parameters ---------- source_file : str, file object or pathlib.Path object Source file. destination_file : str Destination file. kwargs : optional Additional arguments passed to rasterio.vrt._boundless_vrt_doc Returns -...
[ "Make", "a", "VRT", "XML", "document", "and", "write", "it", "in", "file", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/util/raster_utils.py#L414-L437
train
satellogic/telluric
telluric/util/histogram.py
stretch_histogram
def stretch_histogram(img, dark_clip_percentile=None, bright_clip_percentile=None, dark_clip_value=None, bright_clip_value=None, ignore_zero=True): """Stretch img histogram. 2 possible modes: by percentile (pass dark/bright_clip_percentile), or by value (pass dark/bright_clip_value) :...
python
def stretch_histogram(img, dark_clip_percentile=None, bright_clip_percentile=None, dark_clip_value=None, bright_clip_value=None, ignore_zero=True): """Stretch img histogram. 2 possible modes: by percentile (pass dark/bright_clip_percentile), or by value (pass dark/bright_clip_value) :...
[ "def", "stretch_histogram", "(", "img", ",", "dark_clip_percentile", "=", "None", ",", "bright_clip_percentile", "=", "None", ",", "dark_clip_value", "=", "None", ",", "bright_clip_value", "=", "None", ",", "ignore_zero", "=", "True", ")", ":", "# verify stretchin...
Stretch img histogram. 2 possible modes: by percentile (pass dark/bright_clip_percentile), or by value (pass dark/bright_clip_value) :param dark_clip_percentile: percent of pixels that will be saturated to min_value :param bright_clip_percentile: percent of pixels that will be saturated to max_value :p...
[ "Stretch", "img", "histogram", "." ]
e752cd3ee71e339f79717e526fde362e80055d9e
https://github.com/satellogic/telluric/blob/e752cd3ee71e339f79717e526fde362e80055d9e/telluric/util/histogram.py#L10-L53
train
AndrewAnnex/SpiceyPy
getspice.py
GetCSPICE._distribution_info
def _distribution_info(self): """Creates the distribution name and the expected extension for the CSPICE package and returns it. :return (distribution, extension) tuple where distribution is the best guess from the strings available within the platform_urls list ...
python
def _distribution_info(self): """Creates the distribution name and the expected extension for the CSPICE package and returns it. :return (distribution, extension) tuple where distribution is the best guess from the strings available within the platform_urls list ...
[ "def", "_distribution_info", "(", "self", ")", ":", "print", "(", "'Gathering information...'", ")", "system", "=", "platform", ".", "system", "(", ")", "# Cygwin system is CYGWIN-NT-xxx.", "system", "=", "'cygwin'", "if", "'CYGWIN'", "in", "system", "else", "syst...
Creates the distribution name and the expected extension for the CSPICE package and returns it. :return (distribution, extension) tuple where distribution is the best guess from the strings available within the platform_urls list of strings, and extension is either "zip"...
[ "Creates", "the", "distribution", "name", "and", "the", "expected", "extension", "for", "the", "CSPICE", "package", "and", "returns", "it", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/getspice.py#L153-L180
train
AndrewAnnex/SpiceyPy
getspice.py
GetCSPICE._download
def _download(self): """Support function that encapsulates the OpenSSL transfer of the CSPICE package to the self._local io.ByteIO stream. :raises RuntimeError if there has been any issue with the HTTPS communication .. note:: Handling of CSPICE...
python
def _download(self): """Support function that encapsulates the OpenSSL transfer of the CSPICE package to the self._local io.ByteIO stream. :raises RuntimeError if there has been any issue with the HTTPS communication .. note:: Handling of CSPICE...
[ "def", "_download", "(", "self", ")", ":", "# Use urllib3 (based on PyOpenSSL).", "if", "ssl", ".", "OPENSSL_VERSION", "<", "'OpenSSL 1.0.1g'", ":", "# Force urllib3 to use pyOpenSSL", "import", "urllib3", ".", "contrib", ".", "pyopenssl", "urllib3", ".", "contrib", "...
Support function that encapsulates the OpenSSL transfer of the CSPICE package to the self._local io.ByteIO stream. :raises RuntimeError if there has been any issue with the HTTPS communication .. note:: Handling of CSPICE downloads from HTTPS ...
[ "Support", "function", "that", "encapsulates", "the", "OpenSSL", "transfer", "of", "the", "CSPICE", "package", "to", "the", "self", ".", "_local", "io", ".", "ByteIO", "stream", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/getspice.py#L182-L247
train
AndrewAnnex/SpiceyPy
getspice.py
GetCSPICE._unpack
def _unpack(self): """Unpacks the CSPICE package on the given root directory. Note that Package could either be the zipfile.ZipFile class for Windows platforms or tarfile.TarFile for other platforms. """ if self._ext == 'zip': with ZipFile(self._local, 'r') as archive...
python
def _unpack(self): """Unpacks the CSPICE package on the given root directory. Note that Package could either be the zipfile.ZipFile class for Windows platforms or tarfile.TarFile for other platforms. """ if self._ext == 'zip': with ZipFile(self._local, 'r') as archive...
[ "def", "_unpack", "(", "self", ")", ":", "if", "self", ".", "_ext", "==", "'zip'", ":", "with", "ZipFile", "(", "self", ".", "_local", ",", "'r'", ")", "as", "archive", ":", "archive", ".", "extractall", "(", "self", ".", "_root", ")", "else", ":",...
Unpacks the CSPICE package on the given root directory. Note that Package could either be the zipfile.ZipFile class for Windows platforms or tarfile.TarFile for other platforms.
[ "Unpacks", "the", "CSPICE", "package", "on", "the", "given", "root", "directory", ".", "Note", "that", "Package", "could", "either", "be", "the", "zipfile", ".", "ZipFile", "class", "for", "Windows", "platforms", "or", "tarfile", ".", "TarFile", "for", "othe...
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/getspice.py#L249-L261
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spiceErrorCheck
def spiceErrorCheck(f): """ Decorator for spiceypy hooking into spice error system. If an error is detected, an output similar to outmsg :type f: builtins.function :return: :rtype: """ @functools.wraps(f) def with_errcheck(*args, **kwargs): try: res = f(*args, *...
python
def spiceErrorCheck(f): """ Decorator for spiceypy hooking into spice error system. If an error is detected, an output similar to outmsg :type f: builtins.function :return: :rtype: """ @functools.wraps(f) def with_errcheck(*args, **kwargs): try: res = f(*args, *...
[ "def", "spiceErrorCheck", "(", "f", ")", ":", "@", "functools", ".", "wraps", "(", "f", ")", "def", "with_errcheck", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "try", ":", "res", "=", "f", "(", "*", "args", ",", "*", "*", "kwargs", ")...
Decorator for spiceypy hooking into spice error system. If an error is detected, an output similar to outmsg :type f: builtins.function :return: :rtype:
[ "Decorator", "for", "spiceypy", "hooking", "into", "spice", "error", "system", ".", "If", "an", "error", "is", "detected", "an", "output", "similar", "to", "outmsg" ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L64-L83
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spiceFoundExceptionThrower
def spiceFoundExceptionThrower(f): """ Decorator for wrapping functions that use status codes """ @functools.wraps(f) def wrapper(*args, **kwargs): res = f(*args, **kwargs) if config.catch_false_founds: found = res[-1] if isinstance(found, bool) and not found:...
python
def spiceFoundExceptionThrower(f): """ Decorator for wrapping functions that use status codes """ @functools.wraps(f) def wrapper(*args, **kwargs): res = f(*args, **kwargs) if config.catch_false_founds: found = res[-1] if isinstance(found, bool) and not found:...
[ "def", "spiceFoundExceptionThrower", "(", "f", ")", ":", "@", "functools", ".", "wraps", "(", "f", ")", "def", "wrapper", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "res", "=", "f", "(", "*", "args", ",", "*", "*", "kwargs", ")", "if", ...
Decorator for wrapping functions that use status codes
[ "Decorator", "for", "wrapping", "functions", "that", "use", "status", "codes" ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L86-L108
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
appndc
def appndc(item, cell): """ Append an item to a character cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndc_c.html :param item: The item to append. :type item: str or list :param cell: The cell to append to. :type cell: spiceypy.utils.support_types.SpiceCell """ ...
python
def appndc(item, cell): """ Append an item to a character cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndc_c.html :param item: The item to append. :type item: str or list :param cell: The cell to append to. :type cell: spiceypy.utils.support_types.SpiceCell """ ...
[ "def", "appndc", "(", "item", ",", "cell", ")", ":", "assert", "isinstance", "(", "cell", ",", "stypes", ".", "SpiceCell", ")", "if", "isinstance", "(", "item", ",", "list", ")", ":", "for", "c", "in", "item", ":", "libspice", ".", "appndc_c", "(", ...
Append an item to a character cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndc_c.html :param item: The item to append. :type item: str or list :param cell: The cell to append to. :type cell: spiceypy.utils.support_types.SpiceCell
[ "Append", "an", "item", "to", "a", "character", "cell", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L217-L234
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
appndd
def appndd(item, cell): """ Append an item to a double precision cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndd_c.html :param item: The item to append. :type item: Union[float,Iterable[float]] :param cell: The cell to append to. :type cell: spiceypy.utils.support_type...
python
def appndd(item, cell): """ Append an item to a double precision cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndd_c.html :param item: The item to append. :type item: Union[float,Iterable[float]] :param cell: The cell to append to. :type cell: spiceypy.utils.support_type...
[ "def", "appndd", "(", "item", ",", "cell", ")", ":", "assert", "isinstance", "(", "cell", ",", "stypes", ".", "SpiceCell", ")", "if", "hasattr", "(", "item", ",", "\"__iter__\"", ")", ":", "for", "d", "in", "item", ":", "libspice", ".", "appndd_c", "...
Append an item to a double precision cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndd_c.html :param item: The item to append. :type item: Union[float,Iterable[float]] :param cell: The cell to append to. :type cell: spiceypy.utils.support_types.SpiceCell
[ "Append", "an", "item", "to", "a", "double", "precision", "cell", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L238-L255
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
appndi
def appndi(item, cell): """ Append an item to an integer cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndi_c.html :param item: The item to append. :type item: Union[float,Iterable[int]] :param cell: The cell to append to. :type cell: spiceypy.utils.support_types.SpiceCel...
python
def appndi(item, cell): """ Append an item to an integer cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndi_c.html :param item: The item to append. :type item: Union[float,Iterable[int]] :param cell: The cell to append to. :type cell: spiceypy.utils.support_types.SpiceCel...
[ "def", "appndi", "(", "item", ",", "cell", ")", ":", "assert", "isinstance", "(", "cell", ",", "stypes", ".", "SpiceCell", ")", "if", "hasattr", "(", "item", ",", "\"__iter__\"", ")", ":", "for", "i", "in", "item", ":", "libspice", ".", "appndi_c", "...
Append an item to an integer cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndi_c.html :param item: The item to append. :type item: Union[float,Iterable[int]] :param cell: The cell to append to. :type cell: spiceypy.utils.support_types.SpiceCell
[ "Append", "an", "item", "to", "an", "integer", "cell", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L259-L276
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
axisar
def axisar(axis, angle): """ Construct a rotation matrix that rotates vectors by a specified angle about a specified axis. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/axisar_c.html :param axis: Rotation axis. :type axis: 3 Element vector (list, tuple, numpy array) :param angle...
python
def axisar(axis, angle): """ Construct a rotation matrix that rotates vectors by a specified angle about a specified axis. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/axisar_c.html :param axis: Rotation axis. :type axis: 3 Element vector (list, tuple, numpy array) :param angle...
[ "def", "axisar", "(", "axis", ",", "angle", ")", ":", "axis", "=", "stypes", ".", "toDoubleVector", "(", "axis", ")", "angle", "=", "ctypes", ".", "c_double", "(", "angle", ")", "r", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", ...
Construct a rotation matrix that rotates vectors by a specified angle about a specified axis. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/axisar_c.html :param axis: Rotation axis. :type axis: 3 Element vector (list, tuple, numpy array) :param angle: Rotation angle, in radians. :t...
[ "Construct", "a", "rotation", "matrix", "that", "rotates", "vectors", "by", "a", "specified", "angle", "about", "a", "specified", "axis", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L280-L298
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
badkpv
def badkpv(caller, name, comp, insize, divby, intype): """ Determine if a kernel pool variable is present and if so that it has the correct size and type. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/badkpv_c.html :param caller: Name of the routine calling this routine. :type caller...
python
def badkpv(caller, name, comp, insize, divby, intype): """ Determine if a kernel pool variable is present and if so that it has the correct size and type. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/badkpv_c.html :param caller: Name of the routine calling this routine. :type caller...
[ "def", "badkpv", "(", "caller", ",", "name", ",", "comp", ",", "insize", ",", "divby", ",", "intype", ")", ":", "caller", "=", "stypes", ".", "stringToCharP", "(", "caller", ")", "name", "=", "stypes", ".", "stringToCharP", "(", "name", ")", "comp", ...
Determine if a kernel pool variable is present and if so that it has the correct size and type. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/badkpv_c.html :param caller: Name of the routine calling this routine. :type caller: str :param name: Name of a kernel pool variable. :type na...
[ "Determine", "if", "a", "kernel", "pool", "variable", "is", "present", "and", "if", "so", "that", "it", "has", "the", "correct", "size", "and", "type", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L331-L359
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bltfrm
def bltfrm(frmcls, outCell=None): """ Return a SPICE set containing the frame IDs of all built-in frames of a specified class. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bltfrm_c.html :param frmcls: Frame class. :type frmcls: int :param outCell: Optional SpiceInt Cell that is ...
python
def bltfrm(frmcls, outCell=None): """ Return a SPICE set containing the frame IDs of all built-in frames of a specified class. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bltfrm_c.html :param frmcls: Frame class. :type frmcls: int :param outCell: Optional SpiceInt Cell that is ...
[ "def", "bltfrm", "(", "frmcls", ",", "outCell", "=", "None", ")", ":", "frmcls", "=", "ctypes", ".", "c_int", "(", "frmcls", ")", "if", "not", "outCell", ":", "outCell", "=", "stypes", ".", "SPICEINT_CELL", "(", "1000", ")", "libspice", ".", "bltfrm_c"...
Return a SPICE set containing the frame IDs of all built-in frames of a specified class. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bltfrm_c.html :param frmcls: Frame class. :type frmcls: int :param outCell: Optional SpiceInt Cell that is returned :type outCell: spiceypy.utils.sup...
[ "Return", "a", "SPICE", "set", "containing", "the", "frame", "IDs", "of", "all", "built", "-", "in", "frames", "of", "a", "specified", "class", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L363-L381
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bodc2n
def bodc2n(code, lenout=_default_len_out): """ Translate the SPICE integer code of a body into a common name for that body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodc2n_c.html :param code: Integer ID code to be translated into a name. :type code: int :param lenout: Maximu...
python
def bodc2n(code, lenout=_default_len_out): """ Translate the SPICE integer code of a body into a common name for that body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodc2n_c.html :param code: Integer ID code to be translated into a name. :type code: int :param lenout: Maximu...
[ "def", "bodc2n", "(", "code", ",", "lenout", "=", "_default_len_out", ")", ":", "code", "=", "ctypes", ".", "c_int", "(", "code", ")", "name", "=", "stypes", ".", "stringToCharP", "(", "\" \"", "*", "lenout", ")", "lenout", "=", "ctypes", ".", "c_int",...
Translate the SPICE integer code of a body into a common name for that body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodc2n_c.html :param code: Integer ID code to be translated into a name. :type code: int :param lenout: Maximum length of output name. :type lenout: int :ret...
[ "Translate", "the", "SPICE", "integer", "code", "of", "a", "body", "into", "a", "common", "name", "for", "that", "body", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L386-L405
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bodc2s
def bodc2s(code, lenout=_default_len_out): """ Translate a body ID code to either the corresponding name or if no name to ID code mapping exists, the string representation of the body ID value. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodc2s_c.html :param code: Integer ID code t...
python
def bodc2s(code, lenout=_default_len_out): """ Translate a body ID code to either the corresponding name or if no name to ID code mapping exists, the string representation of the body ID value. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodc2s_c.html :param code: Integer ID code t...
[ "def", "bodc2s", "(", "code", ",", "lenout", "=", "_default_len_out", ")", ":", "code", "=", "ctypes", ".", "c_int", "(", "code", ")", "name", "=", "stypes", ".", "stringToCharP", "(", "\" \"", "*", "lenout", ")", "lenout", "=", "ctypes", ".", "c_int",...
Translate a body ID code to either the corresponding name or if no name to ID code mapping exists, the string representation of the body ID value. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodc2s_c.html :param code: Integer ID code to translate to a string. :type code: int :param...
[ "Translate", "a", "body", "ID", "code", "to", "either", "the", "corresponding", "name", "or", "if", "no", "name", "to", "ID", "code", "mapping", "exists", "the", "string", "representation", "of", "the", "body", "ID", "value", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L409-L428
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bodfnd
def bodfnd(body, item): """ Determine whether values exist for some item for any body in the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodfnd_c.html :param body: ID code of body. :type body: int :param item: Item to find ("RADII", "NUT_AMP_RA", etc.). :type i...
python
def bodfnd(body, item): """ Determine whether values exist for some item for any body in the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodfnd_c.html :param body: ID code of body. :type body: int :param item: Item to find ("RADII", "NUT_AMP_RA", etc.). :type i...
[ "def", "bodfnd", "(", "body", ",", "item", ")", ":", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "item", "=", "stypes", ".", "stringToCharP", "(", "item", ")", "return", "bool", "(", "libspice", ".", "bodfnd_c", "(", "body", ",", "item", ...
Determine whether values exist for some item for any body in the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodfnd_c.html :param body: ID code of body. :type body: int :param item: Item to find ("RADII", "NUT_AMP_RA", etc.). :type item: str :return: True if the it...
[ "Determine", "whether", "values", "exist", "for", "some", "item", "for", "any", "body", "in", "the", "kernel", "pool", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L450-L466
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bodn2c
def bodn2c(name): """ Translate the name of a body or object to the corresponding SPICE integer ID code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodn2c_c.html :param name: Body name to be translated into a SPICE ID code. :type name: str :return: SPICE integer ID code for th...
python
def bodn2c(name): """ Translate the name of a body or object to the corresponding SPICE integer ID code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodn2c_c.html :param name: Body name to be translated into a SPICE ID code. :type name: str :return: SPICE integer ID code for th...
[ "def", "bodn2c", "(", "name", ")", ":", "name", "=", "stypes", ".", "stringToCharP", "(", "name", ")", "code", "=", "ctypes", ".", "c_int", "(", "0", ")", "found", "=", "ctypes", ".", "c_int", "(", "0", ")", "libspice", ".", "bodn2c_c", "(", "name"...
Translate the name of a body or object to the corresponding SPICE integer ID code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodn2c_c.html :param name: Body name to be translated into a SPICE ID code. :type name: str :return: SPICE integer ID code for the named body. :rtype: int
[ "Translate", "the", "name", "of", "a", "body", "or", "object", "to", "the", "corresponding", "SPICE", "integer", "ID", "code", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L471-L487
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bods2c
def bods2c(name): """ Translate a string containing a body name or ID code to an integer code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bods2c_c.html :param name: String to be translated to an ID code. :type name: str :return: Integer ID code corresponding to name. :rtype: i...
python
def bods2c(name): """ Translate a string containing a body name or ID code to an integer code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bods2c_c.html :param name: String to be translated to an ID code. :type name: str :return: Integer ID code corresponding to name. :rtype: i...
[ "def", "bods2c", "(", "name", ")", ":", "name", "=", "stypes", ".", "stringToCharP", "(", "name", ")", "code", "=", "ctypes", ".", "c_int", "(", "0", ")", "found", "=", "ctypes", ".", "c_int", "(", "0", ")", "libspice", ".", "bods2c_c", "(", "name"...
Translate a string containing a body name or ID code to an integer code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bods2c_c.html :param name: String to be translated to an ID code. :type name: str :return: Integer ID code corresponding to name. :rtype: int
[ "Translate", "a", "string", "containing", "a", "body", "name", "or", "ID", "code", "to", "an", "integer", "code", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L492-L507
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bodvcd
def bodvcd(bodyid, item, maxn): """ Fetch from the kernel pool the double precision values of an item associated with a body, where the body is specified by an integer ID code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodvcd_c.html :param bodyid: Body ID code. :type bodyid: ...
python
def bodvcd(bodyid, item, maxn): """ Fetch from the kernel pool the double precision values of an item associated with a body, where the body is specified by an integer ID code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodvcd_c.html :param bodyid: Body ID code. :type bodyid: ...
[ "def", "bodvcd", "(", "bodyid", ",", "item", ",", "maxn", ")", ":", "bodyid", "=", "ctypes", ".", "c_int", "(", "bodyid", ")", "item", "=", "stypes", ".", "stringToCharP", "(", "item", ")", "dim", "=", "ctypes", ".", "c_int", "(", ")", "values", "=...
Fetch from the kernel pool the double precision values of an item associated with a body, where the body is specified by an integer ID code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodvcd_c.html :param bodyid: Body ID code. :type bodyid: int :param item: Item fo...
[ "Fetch", "from", "the", "kernel", "pool", "the", "double", "precision", "values", "of", "an", "item", "associated", "with", "a", "body", "where", "the", "body", "is", "specified", "by", "an", "integer", "ID", "code", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L541-L566
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bodvrd
def bodvrd(bodynm, item, maxn): """ Fetch from the kernel pool the double precision values of an item associated with a body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodvrd_c.html :param bodynm: Body name. :type bodynm: str :param item: Item for which values...
python
def bodvrd(bodynm, item, maxn): """ Fetch from the kernel pool the double precision values of an item associated with a body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodvrd_c.html :param bodynm: Body name. :type bodynm: str :param item: Item for which values...
[ "def", "bodvrd", "(", "bodynm", ",", "item", ",", "maxn", ")", ":", "bodynm", "=", "stypes", ".", "stringToCharP", "(", "bodynm", ")", "item", "=", "stypes", ".", "stringToCharP", "(", "item", ")", "dim", "=", "ctypes", ".", "c_int", "(", ")", "value...
Fetch from the kernel pool the double precision values of an item associated with a body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodvrd_c.html :param bodynm: Body name. :type bodynm: str :param item: Item for which values are desired, ("RADII", "NUT...
[ "Fetch", "from", "the", "kernel", "pool", "the", "double", "precision", "values", "of", "an", "item", "associated", "with", "a", "body", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L570-L594
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bschoc
def bschoc(value, ndim, lenvals, array, order): """ Do a binary search for a given value within a character string array, accompanied by an order vector. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bscho...
python
def bschoc(value, ndim, lenvals, array, order): """ Do a binary search for a given value within a character string array, accompanied by an order vector. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bscho...
[ "def", "bschoc", "(", "value", ",", "ndim", ",", "lenvals", ",", "array", ",", "order", ")", ":", "value", "=", "stypes", ".", "stringToCharP", "(", "value", ")", "ndim", "=", "ctypes", ".", "c_int", "(", "ndim", ")", "lenvals", "=", "ctypes", ".", ...
Do a binary search for a given value within a character string array, accompanied by an order vector. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bschoc_c.html :param value: Key value to be found in array. ...
[ "Do", "a", "binary", "search", "for", "a", "given", "value", "within", "a", "character", "string", "array", "accompanied", "by", "an", "order", "vector", ".", "Return", "the", "index", "of", "the", "matching", "array", "entry", "or", "-", "1", "if", "the...
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L648-L674
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bschoi
def bschoi(value, ndim, array, order): """ Do a binary search for a given value within an integer array, accompanied by an order vector. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bschoi_c.html :pa...
python
def bschoi(value, ndim, array, order): """ Do a binary search for a given value within an integer array, accompanied by an order vector. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bschoi_c.html :pa...
[ "def", "bschoi", "(", "value", ",", "ndim", ",", "array", ",", "order", ")", ":", "value", "=", "ctypes", ".", "c_int", "(", "value", ")", "ndim", "=", "ctypes", ".", "c_int", "(", "ndim", ")", "array", "=", "stypes", ".", "toIntVector", "(", "arra...
Do a binary search for a given value within an integer array, accompanied by an order vector. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bschoi_c.html :param value: Key value to be found in array. :typ...
[ "Do", "a", "binary", "search", "for", "a", "given", "value", "within", "an", "integer", "array", "accompanied", "by", "an", "order", "vector", ".", "Return", "the", "index", "of", "the", "matching", "array", "entry", "or", "-", "1", "if", "the", "key", ...
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L678-L701
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bsrchc
def bsrchc(value, ndim, lenvals, array): """ Do a binary earch for a given value within a character string array. Return the index of the first matching array entry, or -1 if the key value was not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchc_c.html :param value: Key va...
python
def bsrchc(value, ndim, lenvals, array): """ Do a binary earch for a given value within a character string array. Return the index of the first matching array entry, or -1 if the key value was not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchc_c.html :param value: Key va...
[ "def", "bsrchc", "(", "value", ",", "ndim", ",", "lenvals", ",", "array", ")", ":", "value", "=", "stypes", ".", "stringToCharP", "(", "value", ")", "ndim", "=", "ctypes", ".", "c_int", "(", "ndim", ")", "lenvals", "=", "ctypes", ".", "c_int", "(", ...
Do a binary earch for a given value within a character string array. Return the index of the first matching array entry, or -1 if the key value was not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchc_c.html :param value: Key value to be found in array. :type value: str :p...
[ "Do", "a", "binary", "earch", "for", "a", "given", "value", "within", "a", "character", "string", "array", ".", "Return", "the", "index", "of", "the", "first", "matching", "array", "entry", "or", "-", "1", "if", "the", "key", "value", "was", "not", "fo...
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L705-L728
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bsrchd
def bsrchd(value, ndim, array): """ Do a binary search for a key value within a double precision array, assumed to be in increasing order. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchd_c.html :p...
python
def bsrchd(value, ndim, array): """ Do a binary search for a key value within a double precision array, assumed to be in increasing order. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchd_c.html :p...
[ "def", "bsrchd", "(", "value", ",", "ndim", ",", "array", ")", ":", "value", "=", "ctypes", ".", "c_double", "(", "value", ")", "ndim", "=", "ctypes", ".", "c_int", "(", "ndim", ")", "array", "=", "stypes", ".", "toDoubleVector", "(", "array", ")", ...
Do a binary search for a key value within a double precision array, assumed to be in increasing order. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchd_c.html :param value: Value to find in array. :typ...
[ "Do", "a", "binary", "search", "for", "a", "key", "value", "within", "a", "double", "precision", "array", "assumed", "to", "be", "in", "increasing", "order", ".", "Return", "the", "index", "of", "the", "matching", "array", "entry", "or", "-", "1", "if", ...
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L732-L752
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bsrchi
def bsrchi(value, ndim, array): """ Do a binary search for a key value within an integer array, assumed to be in increasing order. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchi_c.html :param val...
python
def bsrchi(value, ndim, array): """ Do a binary search for a key value within an integer array, assumed to be in increasing order. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchi_c.html :param val...
[ "def", "bsrchi", "(", "value", ",", "ndim", ",", "array", ")", ":", "value", "=", "ctypes", ".", "c_int", "(", "value", ")", "ndim", "=", "ctypes", ".", "c_int", "(", "ndim", ")", "array", "=", "stypes", ".", "toIntVector", "(", "array", ")", "retu...
Do a binary search for a key value within an integer array, assumed to be in increasing order. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchi_c.html :param value: Value to find in array. :type value:...
[ "Do", "a", "binary", "search", "for", "a", "key", "value", "within", "an", "integer", "array", "assumed", "to", "be", "in", "increasing", "order", ".", "Return", "the", "index", "of", "the", "matching", "array", "entry", "or", "-", "1", "if", "the", "k...
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L756-L776
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ccifrm
def ccifrm(frclss, clssid, lenout=_default_len_out): """ Return the frame name, frame ID, and center associated with a given frame class and class ID. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ccifrm_c.html :param frclss: Class of frame. :type frclss: int :param clssid: Class...
python
def ccifrm(frclss, clssid, lenout=_default_len_out): """ Return the frame name, frame ID, and center associated with a given frame class and class ID. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ccifrm_c.html :param frclss: Class of frame. :type frclss: int :param clssid: Class...
[ "def", "ccifrm", "(", "frclss", ",", "clssid", ",", "lenout", "=", "_default_len_out", ")", ":", "frclss", "=", "ctypes", ".", "c_int", "(", "frclss", ")", "clssid", "=", "ctypes", ".", "c_int", "(", "clssid", ")", "lenout", "=", "ctypes", ".", "c_int"...
Return the frame name, frame ID, and center associated with a given frame class and class ID. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ccifrm_c.html :param frclss: Class of frame. :type frclss: int :param clssid: Class ID of frame. :type clssid: int :param lenout: Maximum le...
[ "Return", "the", "frame", "name", "frame", "ID", "and", "center", "associated", "with", "a", "given", "frame", "class", "and", "class", "ID", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L800-L829
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cgv2el
def cgv2el(center, vec1, vec2): """ Form a SPICE ellipse from a center vector and two generating vectors. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cgv2el_c.html :param center: Center Vector :type center: 3-Element Array of floats :param vec1: Vector 1 :type vec1: 3-Element A...
python
def cgv2el(center, vec1, vec2): """ Form a SPICE ellipse from a center vector and two generating vectors. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cgv2el_c.html :param center: Center Vector :type center: 3-Element Array of floats :param vec1: Vector 1 :type vec1: 3-Element A...
[ "def", "cgv2el", "(", "center", ",", "vec1", ",", "vec2", ")", ":", "center", "=", "stypes", ".", "toDoubleVector", "(", "center", ")", "vec1", "=", "stypes", ".", "toDoubleVector", "(", "vec1", ")", "vec2", "=", "stypes", ".", "toDoubleVector", "(", "...
Form a SPICE ellipse from a center vector and two generating vectors. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cgv2el_c.html :param center: Center Vector :type center: 3-Element Array of floats :param vec1: Vector 1 :type vec1: 3-Element Array of floats :param vec2: Vector 2 ...
[ "Form", "a", "SPICE", "ellipse", "from", "a", "center", "vector", "and", "two", "generating", "vectors", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L833-L853
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cidfrm
def cidfrm(cent, lenout=_default_len_out): """ Retrieve frame ID code and name to associate with a frame center. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cidfrm_c.html :param cent: An object to associate a frame with. :type cent: int :param lenout: Available space in output stri...
python
def cidfrm(cent, lenout=_default_len_out): """ Retrieve frame ID code and name to associate with a frame center. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cidfrm_c.html :param cent: An object to associate a frame with. :type cent: int :param lenout: Available space in output stri...
[ "def", "cidfrm", "(", "cent", ",", "lenout", "=", "_default_len_out", ")", ":", "cent", "=", "ctypes", ".", "c_int", "(", "cent", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "frcode", "=", "ctypes", ".", "c_int", "(", ")", "frname...
Retrieve frame ID code and name to associate with a frame center. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cidfrm_c.html :param cent: An object to associate a frame with. :type cent: int :param lenout: Available space in output string frname. :type lenout: int :return: ...
[ "Retrieve", "frame", "ID", "code", "and", "name", "to", "associate", "with", "a", "frame", "center", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L918-L940
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ckcov
def ckcov(ck, idcode, needav, level, tol, timsys, cover=None): """ Find the coverage window for a specified object in a specified CK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckcov_c.html :param ck: Name of CK file. :type ck: str :param idcode: ID code of object. :type ...
python
def ckcov(ck, idcode, needav, level, tol, timsys, cover=None): """ Find the coverage window for a specified object in a specified CK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckcov_c.html :param ck: Name of CK file. :type ck: str :param idcode: ID code of object. :type ...
[ "def", "ckcov", "(", "ck", ",", "idcode", ",", "needav", ",", "level", ",", "tol", ",", "timsys", ",", "cover", "=", "None", ")", ":", "ck", "=", "stypes", ".", "stringToCharP", "(", "ck", ")", "idcode", "=", "ctypes", ".", "c_int", "(", "idcode", ...
Find the coverage window for a specified object in a specified CK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckcov_c.html :param ck: Name of CK file. :type ck: str :param idcode: ID code of object. :type idcode: int :param needav: Flag indicating whether angular velocity is ...
[ "Find", "the", "coverage", "window", "for", "a", "specified", "object", "in", "a", "specified", "CK", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L958-L993
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cklpf
def cklpf(filename): """ Load a CK pointing file for use by the CK readers. Return that file's handle, to be used by other CK routines to refer to the file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cklpf_c.html :param filename: Name of the CK file to be loaded. :type filena...
python
def cklpf(filename): """ Load a CK pointing file for use by the CK readers. Return that file's handle, to be used by other CK routines to refer to the file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cklpf_c.html :param filename: Name of the CK file to be loaded. :type filena...
[ "def", "cklpf", "(", "filename", ")", ":", "filename", "=", "stypes", ".", "stringToCharP", "(", "filename", ")", "handle", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "cklpf_c", "(", "filename", ",", "ctypes", ".", "byref", "(", "handle", ...
Load a CK pointing file for use by the CK readers. Return that file's handle, to be used by other CK routines to refer to the file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cklpf_c.html :param filename: Name of the CK file to be loaded. :type filename: str :return: Loaded file'...
[ "Load", "a", "CK", "pointing", "file", "for", "use", "by", "the", "CK", "readers", ".", "Return", "that", "file", "s", "handle", "to", "be", "used", "by", "other", "CK", "routines", "to", "refer", "to", "the", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1067-L1083
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ckobj
def ckobj(ck, outCell=None): """ Find the set of ID codes of all objects in a specified CK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckobj_c.html :param ck: Name of CK file. :type ck: str :param outCell: Optional user provided Spice Int cell. :type outCell: Optional spi...
python
def ckobj(ck, outCell=None): """ Find the set of ID codes of all objects in a specified CK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckobj_c.html :param ck: Name of CK file. :type ck: str :param outCell: Optional user provided Spice Int cell. :type outCell: Optional spi...
[ "def", "ckobj", "(", "ck", ",", "outCell", "=", "None", ")", ":", "assert", "isinstance", "(", "ck", ",", "str", ")", "ck", "=", "stypes", ".", "stringToCharP", "(", "ck", ")", "if", "not", "outCell", ":", "outCell", "=", "stypes", ".", "SPICEINT_CEL...
Find the set of ID codes of all objects in a specified CK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckobj_c.html :param ck: Name of CK file. :type ck: str :param outCell: Optional user provided Spice Int cell. :type outCell: Optional spiceypy.utils.support_types.SpiceCell :...
[ "Find", "the", "set", "of", "ID", "codes", "of", "all", "objects", "in", "a", "specified", "CK", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1087-L1107
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ckopn
def ckopn(filename, ifname, ncomch): """ Open a new CK file, returning the handle of the opened file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckopn_c.html :param filename: The name of the CK file to be opened. :type filename: str :param ifname: The internal filename for the CK....
python
def ckopn(filename, ifname, ncomch): """ Open a new CK file, returning the handle of the opened file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckopn_c.html :param filename: The name of the CK file to be opened. :type filename: str :param ifname: The internal filename for the CK....
[ "def", "ckopn", "(", "filename", ",", "ifname", ",", "ncomch", ")", ":", "filename", "=", "stypes", ".", "stringToCharP", "(", "filename", ")", "ifname", "=", "stypes", ".", "stringToCharP", "(", "ifname", ")", "ncomch", "=", "ctypes", ".", "c_int", "(",...
Open a new CK file, returning the handle of the opened file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckopn_c.html :param filename: The name of the CK file to be opened. :type filename: str :param ifname: The internal filename for the CK. :type ifname: str :param ncomch: The num...
[ "Open", "a", "new", "CK", "file", "returning", "the", "handle", "of", "the", "opened", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1111-L1131
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ckw01
def ckw01(handle, begtim, endtim, inst, ref, avflag, segid, nrec, sclkdp, quats, avvs): """ Add a type 1 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw01_c.html :param handle: Handle of an open CK file. :type handle: int :param begtim: The beginnin...
python
def ckw01(handle, begtim, endtim, inst, ref, avflag, segid, nrec, sclkdp, quats, avvs): """ Add a type 1 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw01_c.html :param handle: Handle of an open CK file. :type handle: int :param begtim: The beginnin...
[ "def", "ckw01", "(", "handle", ",", "begtim", ",", "endtim", ",", "inst", ",", "ref", ",", "avflag", ",", "segid", ",", "nrec", ",", "sclkdp", ",", "quats", ",", "avvs", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "begtim",...
Add a type 1 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw01_c.html :param handle: Handle of an open CK file. :type handle: int :param begtim: The beginning encoded SCLK of the segment. :type begtim: float :param endtim: The ending encoded SCLK of the segme...
[ "Add", "a", "type", "1", "segment", "to", "a", "C", "-", "kernel", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1150-L1192
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ckw02
def ckw02(handle, begtim, endtim, inst, ref, segid, nrec, start, stop, quats, avvs, rates): """ Write a type 2 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw02_c.html :param handle: Handle of an open CK file. :type handle: int :param begtim: The be...
python
def ckw02(handle, begtim, endtim, inst, ref, segid, nrec, start, stop, quats, avvs, rates): """ Write a type 2 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw02_c.html :param handle: Handle of an open CK file. :type handle: int :param begtim: The be...
[ "def", "ckw02", "(", "handle", ",", "begtim", ",", "endtim", ",", "inst", ",", "ref", ",", "segid", ",", "nrec", ",", "start", ",", "stop", ",", "quats", ",", "avvs", ",", "rates", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", "...
Write a type 2 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw02_c.html :param handle: Handle of an open CK file. :type handle: int :param begtim: The beginning encoded SCLK of the segment. :type begtim: float :param endtim: The ending encoded SCLK of the seg...
[ "Write", "a", "type", "2", "segment", "to", "a", "C", "-", "kernel", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1196-L1241
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ckw03
def ckw03(handle, begtim, endtim, inst, ref, avflag, segid, nrec, sclkdp, quats, avvs, nints, starts): """ Add a type 3 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw03_c.html :param handle: Handle of an open CK file. :type handle: int :param begti...
python
def ckw03(handle, begtim, endtim, inst, ref, avflag, segid, nrec, sclkdp, quats, avvs, nints, starts): """ Add a type 3 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw03_c.html :param handle: Handle of an open CK file. :type handle: int :param begti...
[ "def", "ckw03", "(", "handle", ",", "begtim", ",", "endtim", ",", "inst", ",", "ref", ",", "avflag", ",", "segid", ",", "nrec", ",", "sclkdp", ",", "quats", ",", "avvs", ",", "nints", ",", "starts", ")", ":", "handle", "=", "ctypes", ".", "c_int", ...
Add a type 3 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw03_c.html :param handle: Handle of an open CK file. :type handle: int :param begtim: The beginning encoded SCLK of the segment. :type begtim: float :param endtim: The ending encoded SCLK of the segme...
[ "Add", "a", "type", "3", "segment", "to", "a", "C", "-", "kernel", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1245-L1293
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ckw05
def ckw05(handle, subtype, degree, begtim, endtim, inst, ref, avflag, segid, sclkdp, packts, rate, nints, starts): """ Write a type 5 segment to a CK file. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw05_c.html :param handle: Handle of an open CK file. :type handle: int ...
python
def ckw05(handle, subtype, degree, begtim, endtim, inst, ref, avflag, segid, sclkdp, packts, rate, nints, starts): """ Write a type 5 segment to a CK file. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw05_c.html :param handle: Handle of an open CK file. :type handle: int ...
[ "def", "ckw05", "(", "handle", ",", "subtype", ",", "degree", ",", "begtim", ",", "endtim", ",", "inst", ",", "ref", ",", "avflag", ",", "segid", ",", "sclkdp", ",", "packts", ",", "rate", ",", "nints", ",", "starts", ")", ":", "handle", "=", "ctyp...
Write a type 5 segment to a CK file. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw05_c.html :param handle: Handle of an open CK file. :type handle: int :param subtype: CK type 5 subtype code. Can be: 0, 1, 2, 3 see naif docs via link above. :type subtype: int :param degree: Degr...
[ "Write", "a", "type", "5", "segment", "to", "a", "CK", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1297-L1349
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cltext
def cltext(fname): """ Internal undocumented command for closing a text file opened by RDTEXT. No URL available; relevant lines from SPICE source: FORTRAN SPICE, rdtext.f:: C$Procedure CLTEXT ( Close a text file opened by RDTEXT) ENTRY CLTEXT ( FILE ) CHARACTER*(...
python
def cltext(fname): """ Internal undocumented command for closing a text file opened by RDTEXT. No URL available; relevant lines from SPICE source: FORTRAN SPICE, rdtext.f:: C$Procedure CLTEXT ( Close a text file opened by RDTEXT) ENTRY CLTEXT ( FILE ) CHARACTER*(...
[ "def", "cltext", "(", "fname", ")", ":", "fnameP", "=", "stypes", ".", "stringToCharP", "(", "fname", ")", "fname_len", "=", "ctypes", ".", "c_int", "(", "len", "(", "fname", ")", ")", "libspice", ".", "cltext_", "(", "fnameP", ",", "fname_len", ")" ]
Internal undocumented command for closing a text file opened by RDTEXT. No URL available; relevant lines from SPICE source: FORTRAN SPICE, rdtext.f:: C$Procedure CLTEXT ( Close a text file opened by RDTEXT) ENTRY CLTEXT ( FILE ) CHARACTER*(*) FILE C VAR...
[ "Internal", "undocumented", "command", "for", "closing", "a", "text", "file", "opened", "by", "RDTEXT", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1381-L1407
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cmprss
def cmprss(delim, n, instr, lenout=_default_len_out): """ Compress a character string by removing occurrences of more than N consecutive occurrences of a specified character. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cmprss_c.html :param delim: Delimiter to be compressed. :ty...
python
def cmprss(delim, n, instr, lenout=_default_len_out): """ Compress a character string by removing occurrences of more than N consecutive occurrences of a specified character. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cmprss_c.html :param delim: Delimiter to be compressed. :ty...
[ "def", "cmprss", "(", "delim", ",", "n", ",", "instr", ",", "lenout", "=", "_default_len_out", ")", ":", "delim", "=", "ctypes", ".", "c_char", "(", "delim", ".", "encode", "(", "encoding", "=", "'UTF-8'", ")", ")", "n", "=", "ctypes", ".", "c_int", ...
Compress a character string by removing occurrences of more than N consecutive occurrences of a specified character. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cmprss_c.html :param delim: Delimiter to be compressed. :type delim: str :param n: Maximum consecutive occurrences of del...
[ "Compress", "a", "character", "string", "by", "removing", "occurrences", "of", "more", "than", "N", "consecutive", "occurrences", "of", "a", "specified", "character", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1411-L1435
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cnmfrm
def cnmfrm(cname, lenout=_default_len_out): """ Retrieve frame ID code and name to associate with an object. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cnmfrm_c.html :param cname: Name of the object to find a frame for. :type cname: int :param lenout: Maximum length available for ...
python
def cnmfrm(cname, lenout=_default_len_out): """ Retrieve frame ID code and name to associate with an object. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cnmfrm_c.html :param cname: Name of the object to find a frame for. :type cname: int :param lenout: Maximum length available for ...
[ "def", "cnmfrm", "(", "cname", ",", "lenout", "=", "_default_len_out", ")", ":", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "frname", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "cname", "=", "stypes", ".", "stringToCharP", "...
Retrieve frame ID code and name to associate with an object. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cnmfrm_c.html :param cname: Name of the object to find a frame for. :type cname: int :param lenout: Maximum length available for frame name. :type lenout: int :return: ...
[ "Retrieve", "frame", "ID", "code", "and", "name", "to", "associate", "with", "an", "object", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1440-L1462
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
convrt
def convrt(x, inunit, outunit): """ Take a measurement X, the units associated with X, and units to which X should be converted; return Y the value of the measurement in the output units. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/convrt_c.html :param x: Number representing a meas...
python
def convrt(x, inunit, outunit): """ Take a measurement X, the units associated with X, and units to which X should be converted; return Y the value of the measurement in the output units. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/convrt_c.html :param x: Number representing a meas...
[ "def", "convrt", "(", "x", ",", "inunit", ",", "outunit", ")", ":", "inunit", "=", "stypes", ".", "stringToCharP", "(", "inunit", ")", "outunit", "=", "stypes", ".", "stringToCharP", "(", "outunit", ")", "y", "=", "ctypes", ".", "c_double", "(", ")", ...
Take a measurement X, the units associated with X, and units to which X should be converted; return Y the value of the measurement in the output units. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/convrt_c.html :param x: Number representing a measurement in some units. :type x: float ...
[ "Take", "a", "measurement", "X", "the", "units", "associated", "with", "X", "and", "units", "to", "which", "X", "should", "be", "converted", ";", "return", "Y", "the", "value", "of", "the", "measurement", "in", "the", "output", "units", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1489-L1519
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
copy
def copy(cell): """ Copy the contents of a SpiceCell of any data type to another cell of the same type. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/copy_c.html :param cell: Cell to be copied. :type cell: spiceypy.utils.support_types.SpiceCell :return: New cell :rtype: spice...
python
def copy(cell): """ Copy the contents of a SpiceCell of any data type to another cell of the same type. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/copy_c.html :param cell: Cell to be copied. :type cell: spiceypy.utils.support_types.SpiceCell :return: New cell :rtype: spice...
[ "def", "copy", "(", "cell", ")", ":", "assert", "isinstance", "(", "cell", ",", "stypes", ".", "SpiceCell", ")", "# Next line was redundant with [raise NotImpImplementedError] below", "# assert cell.dtype == 0 or cell.dtype == 1 or cell.dtype == 2", "if", "cell", ".", "dtype"...
Copy the contents of a SpiceCell of any data type to another cell of the same type. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/copy_c.html :param cell: Cell to be copied. :type cell: spiceypy.utils.support_types.SpiceCell :return: New cell :rtype: spiceypy.utils.support_types.Spic...
[ "Copy", "the", "contents", "of", "a", "SpiceCell", "of", "any", "data", "type", "to", "another", "cell", "of", "the", "same", "type", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1523-L1547
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cpos
def cpos(string, chars, start): """ Find the first occurrence in a string of a character belonging to a collection of characters, starting at a specified location, searching forward. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cpos_c.html :param string: Any character string. :t...
python
def cpos(string, chars, start): """ Find the first occurrence in a string of a character belonging to a collection of characters, starting at a specified location, searching forward. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cpos_c.html :param string: Any character string. :t...
[ "def", "cpos", "(", "string", ",", "chars", ",", "start", ")", ":", "string", "=", "stypes", ".", "stringToCharP", "(", "string", ")", "chars", "=", "stypes", ".", "stringToCharP", "(", "chars", ")", "start", "=", "ctypes", ".", "c_int", "(", "start", ...
Find the first occurrence in a string of a character belonging to a collection of characters, starting at a specified location, searching forward. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cpos_c.html :param string: Any character string. :type string: str :param chars: A collecti...
[ "Find", "the", "first", "occurrence", "in", "a", "string", "of", "a", "character", "belonging", "to", "a", "collection", "of", "characters", "starting", "at", "a", "specified", "location", "searching", "forward", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1551-L1573
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cposr
def cposr(string, chars, start): """ Find the first occurrence in a string of a character belonging to a collection of characters, starting at a specified location, searching in reverse. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cposr_c.html :param string: Any character string. ...
python
def cposr(string, chars, start): """ Find the first occurrence in a string of a character belonging to a collection of characters, starting at a specified location, searching in reverse. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cposr_c.html :param string: Any character string. ...
[ "def", "cposr", "(", "string", ",", "chars", ",", "start", ")", ":", "string", "=", "stypes", ".", "stringToCharP", "(", "string", ")", "chars", "=", "stypes", ".", "stringToCharP", "(", "chars", ")", "start", "=", "ctypes", ".", "c_int", "(", "start",...
Find the first occurrence in a string of a character belonging to a collection of characters, starting at a specified location, searching in reverse. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cposr_c.html :param string: Any character string. :type string: str :param chars: A coll...
[ "Find", "the", "first", "occurrence", "in", "a", "string", "of", "a", "character", "belonging", "to", "a", "collection", "of", "characters", "starting", "at", "a", "specified", "location", "searching", "in", "reverse", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1577-L1599
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cvpool
def cvpool(agent): """ Indicate whether or not any watched kernel variables that have a specified agent on their notification list have been updated. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cvpool_c.html :param agent: Name of the agent to check for notices. :type agent: str ...
python
def cvpool(agent): """ Indicate whether or not any watched kernel variables that have a specified agent on their notification list have been updated. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cvpool_c.html :param agent: Name of the agent to check for notices. :type agent: str ...
[ "def", "cvpool", "(", "agent", ")", ":", "agent", "=", "stypes", ".", "stringToCharP", "(", "agent", ")", "update", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "cvpool_c", "(", "agent", ",", "ctypes", ".", "byref", "(", "update", ")", ")"...
Indicate whether or not any watched kernel variables that have a specified agent on their notification list have been updated. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cvpool_c.html :param agent: Name of the agent to check for notices. :type agent: str :return: True if variables for...
[ "Indicate", "whether", "or", "not", "any", "watched", "kernel", "variables", "that", "have", "a", "specified", "agent", "on", "their", "notification", "list", "have", "been", "updated", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1603-L1618
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cyllat
def cyllat(r, lonc, z): """ Convert from cylindrical to latitudinal coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cyllat_c.html :param r: Distance of point from z axis. :type r: float :param lonc: Cylindrical angle of point from XZ plane(radians). :type lonc: float ...
python
def cyllat(r, lonc, z): """ Convert from cylindrical to latitudinal coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cyllat_c.html :param r: Distance of point from z axis. :type r: float :param lonc: Cylindrical angle of point from XZ plane(radians). :type lonc: float ...
[ "def", "cyllat", "(", "r", ",", "lonc", ",", "z", ")", ":", "r", "=", "ctypes", ".", "c_double", "(", "r", ")", "lonc", "=", "ctypes", ".", "c_double", "(", "lonc", ")", "z", "=", "ctypes", ".", "c_double", "(", "z", ")", "radius", "=", "ctypes...
Convert from cylindrical to latitudinal coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cyllat_c.html :param r: Distance of point from z axis. :type r: float :param lonc: Cylindrical angle of point from XZ plane(radians). :type lonc: float :param z: Height of point above X...
[ "Convert", "from", "cylindrical", "to", "latitudinal", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1622-L1645
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cylrec
def cylrec(r, lon, z): """ Convert from cylindrical to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cylrec_c.html :param r: Distance of a point from z axis. :type r: float :param lon: Angle (radians) of a point from xZ plane. :type lon: float :param ...
python
def cylrec(r, lon, z): """ Convert from cylindrical to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cylrec_c.html :param r: Distance of a point from z axis. :type r: float :param lon: Angle (radians) of a point from xZ plane. :type lon: float :param ...
[ "def", "cylrec", "(", "r", ",", "lon", ",", "z", ")", ":", "r", "=", "ctypes", ".", "c_double", "(", "r", ")", "lon", "=", "ctypes", ".", "c_double", "(", "lon", ")", "z", "=", "ctypes", ".", "c_double", "(", "z", ")", "rectan", "=", "stypes", ...
Convert from cylindrical to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cylrec_c.html :param r: Distance of a point from z axis. :type r: float :param lon: Angle (radians) of a point from xZ plane. :type lon: float :param z: Height of a point above xY plane...
[ "Convert", "from", "cylindrical", "to", "rectangular", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1649-L1669
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cylsph
def cylsph(r, lonc, z): """ Convert from cylindrical to spherical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cylsph_c.html :param r: Rectangular coordinates of the point. :type r: float :param lonc: Angle (radians) of point from XZ plane. :type lonc: float :pa...
python
def cylsph(r, lonc, z): """ Convert from cylindrical to spherical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cylsph_c.html :param r: Rectangular coordinates of the point. :type r: float :param lonc: Angle (radians) of point from XZ plane. :type lonc: float :pa...
[ "def", "cylsph", "(", "r", ",", "lonc", ",", "z", ")", ":", "r", "=", "ctypes", ".", "c_double", "(", "r", ")", "lonc", "=", "ctypes", ".", "c_double", "(", "lonc", ")", "z", "=", "ctypes", ".", "c_double", "(", "z", ")", "radius", "=", "ctypes...
Convert from cylindrical to spherical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cylsph_c.html :param r: Rectangular coordinates of the point. :type r: float :param lonc: Angle (radians) of point from XZ plane. :type lonc: float :param z: Height of point above XY plan...
[ "Convert", "from", "cylindrical", "to", "spherical", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1673-L1699
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dafac
def dafac(handle, buffer): """ Add comments from a buffer of character strings to the comment area of a binary DAF file, appending them to any comments which are already present in the file's comment area. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafac_c.html :param handle: hand...
python
def dafac(handle, buffer): """ Add comments from a buffer of character strings to the comment area of a binary DAF file, appending them to any comments which are already present in the file's comment area. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafac_c.html :param handle: hand...
[ "def", "dafac", "(", "handle", ",", "buffer", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "lenvals", "=", "ctypes", ".", "c_int", "(", "len", "(", "max", "(", "buffer", ",", "key", "=", "len", ")", ")", "+", "1", ")", "...
Add comments from a buffer of character strings to the comment area of a binary DAF file, appending them to any comments which are already present in the file's comment area. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafac_c.html :param handle: handle of a DAF opened with write access. ...
[ "Add", "comments", "from", "a", "buffer", "of", "character", "strings", "to", "the", "comment", "area", "of", "a", "binary", "DAF", "file", "appending", "them", "to", "any", "comments", "which", "are", "already", "present", "in", "the", "file", "s", "comme...
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1706-L1723
train