This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import Any | |
| import numpy as np | |
| def padded_array(list_: list, padval: Any = np.nan) -> np.ndarray: | |
| """Make np.array from ragged nested lists. | |
| Convert list of any dimension into an np.array with no ragged parts. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [tool.poetry] | |
| name = "test" | |
| version = "0.1.0" | |
| description = "" | |
| [tool.poetry.dependencies] | |
| python = "^3.7" | |
| matplotlib = "^3.3.2" | |
| astropy = "^4.1" | |
| numpy = "^1.19.4" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Get board temperature | |
| via UDP in IPv4 (SOCK_DGRAM) | |
| from "localhost:16210" | |
| send it to "xffts_board##" and "xffts_power_board##" topics | |
| Get spectral data | |
| via TCP in IPv4 (SOCK_STREAM) | |
| from "localhost:25144" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from astropy.coordinates import SkyCoord, EarthLocation, Angle | |
| from astropy.time import Time | |
| from datetime import datetime | |
| def get_lst(location, hemisphere='n'): | |
| """Not precise. | |
| Parameters | |
| ---------- | |
| location: astropy.coordinates.EarthLocation | |
| Location of observer. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import Union, Type, Any | |
| def base_expand(clss: Union[list, Type[Any]]) -> list: | |
| """ | |
| Parameters | |
| ---------- | |
| clss: class or list of classes | |
| Any class you want to know the base classes. |
NewerOlder