TOM Specific Settings

The following is a list of TOM Specific settings to be added/edited in your project’s settings.py. For explanations of Django specific settings, see the official documentation.

AUTH_STRATEGY

Default: ‘READ_ONLY’

Determines how your TOM treats unauthenticated users. A value of READ_ONLY allows unauthenticated users to view most pages on your TOM, but not to change anything. A value of LOCKED requires all users to login before viewing any page. Use the OPEN_URLS setting for adding exemptions.

BROKERS

Default:

{
     'TNS': {
        'api_key': ''
     },
     'SCIMMA': {
         'url': 'http://skip.dev.hop.scimma.org',
         'api_key': os.getenv('SKIP_API_KEY', ''),
         'hopskotch_url': 'dev.hop.scimma.org',
         'hopskotch_username': os.getenv('HOPSKOTCH_USERNAME', ''),
         'hopskotch_password': os.getenv('HOPSKOTCH_PASSWORD', ''),
         'default_hopskotch_topic': ''
     }
}

Credentials and settings for any brokers that require them. At the moment, the only built-in TOM Toolkit broker module that requires credentials is the TNS. SCIMMA and ANTARES, which are available as add-on modules, also use this setting.

DATA_PROCESSORS

Default:

{
    'photometry': 'tom_dataproducts.processors.photometry_processor.PhotometryProcessor',
    'spectroscopy': 'tom_dataproducts.processors.spectroscopy_processor.SpectroscopyProcessor',
}

The DATA_PROCESSORS dict specifies the subclasses of DataProcessor that should be used for processing the corresponding data_types.

DATA_PRODUCT_TYPES

Default:

{
    'spectroscopy': ('spectroscopy', 'Spectroscopy'),
    'photometry': ('photometry', 'Photometry'),
    'spectroscopy': ('spectroscopy', 'Spectroscopy'),
    'image_file': ('image_file', 'Image File')
}

A list of machine readable, human readable tuples which determine the choices available to categorize reduced data.

EXTRA_FIELDS

Default: []

A list of extra fields to add to your targets. These can be used if the predefined target fields do not match your needs. Please see the documentation on Adding Custom Fields to Targets for an explanation of how to use this feature.

FACILITIES

Default:

{
    'LCO': {
        'portal_url': 'https://observe.lco.global',
        'api_key': os.getenv('LCO_API_KEY', ''),
    }
}

Observation facilities read their configuration values from this dictionary. Although each facility is different, if you plan on using one you’ll probably have to configure it here first. For example the LCO facility requires you to provide a value for the api_key configuration value.

HARVESTERS

Default:

{
     'TNS': {
        'api_key': ''
     },
}

Credentials and settings for any harvesters that require them. At the moment, the only built-in TOM Toolkit broker module that requires credentials is the TNS.

HINTS

Default:

HINTS_ENABLED = False
HINT_LEVEL = 20

A few messages are sprinkled throughout the TOM Toolkit that offer suggestions on things you might want to change right out of the gate. These can be turned on and off, and the level adjusted. For more information on Django message levels, see the Django messages framework documentation.

HOOKS

Default:

{
    'target_post_save': 'tom_common.hooks.target_post_save',
    'observation_change_state': 'tom_common.hooks.observation_change_state',
    'data_product_post_upload': 'tom_dataproducts.hooks.data_product_post_upload',
}

A dictionary of action, method code hooks to run. These hooks allow running arbitrary python code when specific actions happen within a TOM, such as an observation changing state. See the documentation on Running Custom Code on Actions in your TOM for more details and available hooks.

OPEN_URLS

Default: []

With an AUTH_STRATEGY value of LOCKED, urls in this list will remain visible to unauthenticated users. You might add the homepage (‘/’), for example.

TARGET_PERMISSIONS_ONLY

Default: True

This settings determines the permissions strategy of the TOM. When set to True, authorization permissions will be set on Targets and cascade from there–that is, a group that can see a Target can see all ObservationRecords and Data associated with the Target. When set to False, permissions can be set for a group at the Target level, the ObservationRecord level, or the DataProduct level.

TARGET_TYPE

Default: No default

Can be either SIDEREAL or NON_SIDEREAL. This setting determines the default target type for your TOM. TOMs can still create and work with targets of both types even after this option is set, but setting it to one of the values will optimize the workflow for that target type.

TOM_ALERT_CLASSES

Default:

[
    'tom_alerts.brokers.mars.MARSBroker',
    'tom_alerts.brokers.lasair.LasairBroker',
    'tom_alerts.brokers.scout.ScoutBroker',
    'tom_alerts.brokers.tns.TNSBroker',
    'tom_alerts.brokers.antares.ANTARESBroker',
    'tom_alerts.brokers.gaia.GaiaBroker'
]

A list of tom alert classes to make available to your TOM. If you have written or downloaded additional alert classes you would make them available here. If you’d like to write your own alert module please see the documentation on Creating an Alert Module for the TOM Toolkit.

TOM_ALERT_DASH_CLASSES

Default:

[
   'tom_alerts_dash.brokers.alerce.ALeRCEDashBroker',
   'tom_alerts_dash.brokers.mars.MARSDashBroker',
]

A list of tom alert dash classes to make available to your TOM. If you have written or downloaded additional alert classes you would make them available here. If you’d like to write your own dash alert module, please see the documentation on Plotly Dash Broker Modules in the TOM Toolkit.

TOM_FACILITY_CLASSES

Default:

A list of observation facility classes to make available to your TOM. If you have written or downloaded a custom observation facility you would add the class to this list to make your TOM load it.

TOM_HARVESTER_CLASSES

Default:

A list of TOM harverster classes to make available to your TOM. If you have written or downloaded additional harvester classes you would make them available here.

TOM_LATEX_PROCESSORS

Default:

A dictionary with the keys being TOM models classes and the values being the modules that should be used to generate latex tables for those models.

TOM_REGISTRATION

Default: None

Example:

TOM_NAME

Default: TOM Toolkit

Set the name of the TOM, used for display purposes such as the navbar and page titles.