API utilities
Functions
convertJD2000(dt)
Convert julianday (seconds) to datetime.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dt |
float
|
julianday (seconds) |
required |
Returns:
| Type | Description |
|---|---|
datetime
|
datetime of julianday |
Source code in leocdf/utilities/utilities.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
mjd2000(dt)
Calculates julianday (seconds) of the specified datetime
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dt |
datetime
|
Datetime to be converted. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Seconds since 01/01/2000. |
Source code in leocdf/utilities/utilities.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |
questionoverwrite(file)
Interactive request for path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file |
Path | str
|
Path that already exists. |
required |
Returns:
| Type | Description |
|---|---|
Path
|
New Path that not exists. |
Source code in leocdf/utilities/utilities.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
readJson(fileJson)
Reads JSON file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fileJson |
Path | str
|
File name to be read. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Data from JSON file. |
Source code in leocdf/utilities/utilities.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | |