lcc.api package

Submodules

lcc.api.input_parse module

lcc.api.input_parse.parse_query_ranges(raw_params, split_by=':', enum_by=';')[source]

Parse range strings

Parameters:

raw_params : list

List of strings which are composed of 0, 1 or 2 of split_by symbols.

split_by : str

Symbol which divides parameters ranges into from-to-step parts

Returns:

list

List of lists of whole range of combinations for particular parameters

lcc.api.input_parse.parse_tun_query(raw_params)[source]

Parse query of merged identifiers with their parameters

Parameters:

raw_params : list

List of dictionaries of: ‘name:params’ : value. For example [{‘VarioShapeDescr:alphabet_size’: 7, ...}, ..]

Returns:

list

List of nested dictionaries. Keys are names of objects and their values are parameters (as keys for their values)

lcc.api.stars_handling module

lcc.api.stars_handling.getStars(queries, lcs_fold, query_path=None, progb_txt='Querying stars: ')[source]

Get stars from query text. According to format of the query text different methods are called.

1.QUERY:db_name:query_file_in_inputs_folder
–> Remote database is queried (db key is name of connector class)
2.stars_folder_key:number or stars_folder_key:float_number or stars_folder_key
–> Light curves from folder according to first key is loaded
(according to settings.STARS_PATH dictionary). All stars are loaded if there is no number and ‘:’, in case of integer after ‘:’ just this number of stars are loaded and if there are float number after ‘:’ this percentage number of all stars are loaded.
lcc.api.stars_handling.getStarsFromFolder(single_path, lcs_fold)[source]

Get stars from folder/s. If path is iterable (case that more folders were given, light curves from that all folder will be loaded

Parameters:

single_path : str

Name of the folder of lightcurves from “light_curve” directory (specified in settings).

Returns:

stars : List of Star objects

Stars from the folder

lcc.api.stars_handling.getStarsFromRemoteDb(query, query_path)[source]

This method parsing the query text in order to return desired stars from remote database.

Parameters:

query : str

Query text contains db_key and query file separated by ‘:’

Returns:

List of Star objects

Module contents