Todo-list utility functions (starclass.todolist)

Code author: Rasmus Handberg <>

starclass.todolist.create_fake_todolist(input_folder, name='todo.sqlite', pattern=None, overwrite=False)[source]

Create todo-file by scanning directory for light curve files.

  • input_folder (str) – Path to directory containing light curves to build todo-file from.

  • name (str) – Name of the todo-file which will be created in input_folder.

  • pattern (str) – Pattern to use for searching for light curve files in input_folder. The pattern must be a sting which can be interpreted by the fnmatch module. The default is to match all FITS files (including compressed files).

  • overwrite (bool) – Overwrite existing todo-file. Default is to not overwrite.


Path to the generated todo-file.

Return type


Code author: Rasmus Handberg <>

starclass.todolist.todolist_cleanup(conn, cursor)[source]

Perform a cleanup (ANALYZE and VACUUM) of the todolist.

  • conn (sqlite3.Connection) – Connection to SQLite file.

  • cursor (sqlite3.Cursor) – Cursor in SQLite file.

Code author: Rasmus Handberg <>

starclass.todolist.todolist_insert(cursor, priority=None, lightcurve=None, starid=None, tmag=None, datasource='ffi', variance=None, rms_hour=None, ptp=None, elaptime=None)[source]

Insert an entry in the todo.sqlite file.

  • cursor (sqlite3.Cursor) – Cursor in SQLite file.

  • priority (int) –

  • lightcurve (str) –

  • starid (int) –

  • tmag (float) – TESS Magnitude.

  • datasource (str) –

  • variance (float) –

  • rms_hour (float) –

  • ptp (float) –

  • elaptime (float) –

Code author: Rasmus Handberg <>


Generate overall database structure for todo.sqlite.


conn (sqlite3.connection) – Connection to SQLite file.

Code author: Rasmus Handberg <>