Conf#
- class astropy.time.Conf[source]#
 Bases:
ConfigNamespaceConfiguration parameters for
astropy.time.Attributes Summary
The type of masked array used for masked output data.
Use fast C parser for supported time strings formats, including ISO, ISOT, and YearDayTime.
Methods Summary
help([name])Print info about configuration items.
items()Iterate over configuration item
(name, value)pairs.keys()reload([attr])Reload a configuration item from the configuration file.
reset([attr])Reset a configuration item to its default.
set_temp(attr, value)Temporarily set a configuration value.
values()Iterate over configuration item values.
Attributes Documentation
- masked_array_type#
 The type of masked array used for masked output data. Can be “astropy” for
astropy.utils.masked.Maskedor “numpy” to usenumpy.ma.MaskedArray. Note that ifastropy.units.Quantityis produced, the output always usesastropy.utils.masked.Masked, sincenumpy.ma.MaskedArraydoes not work with quantities.
- use_fast_parser#
 Use fast C parser for supported time strings formats, including ISO, ISOT, and YearDayTime. Allowed values are the ‘False’ (use Python parser),’True’ (use C parser and fall through to Python parser if fails), and ‘force’ (use C parser and raise exception if it fails). Note that theoptions are all strings.
Methods Documentation
- help(name=None)#
 Print info about configuration items.
- Parameters:
 - name
str, optional Name of the configuration item to be described. If no name is provided then info about all the configuration items will be printed.
- name
 
Examples
>>> from astropy import conf >>> conf.help("unicode_output") ConfigItem: unicode_output cfgtype='boolean' defaultvalue=False description='When True, use Unicode characters when outputting values, and displaying widgets at the console.' module=astropy value=False
- items()#
 Iterate over configuration item
(name, value)pairs.
- keys()#
 
- reload(attr=None)#
 Reload a configuration item from the configuration file.
- Parameters:
 - attr
python:str, optional The name of the configuration parameter to reload. If not provided, reload all configuration parameters.
- attr
 
- reset(attr=None)#
 Reset a configuration item to its default.
- Parameters:
 - attr
python:str, optional The name of the configuration parameter to reload. If not provided, reset all configuration parameters.
- attr
 
- set_temp(attr, value)#
 Temporarily set a configuration value.
- Parameters:
 - attr
python:str Configuration item name
- value
object The value to set temporarily.
- attr
 
Examples
>>> import astropy >>> with astropy.conf.set_temp('use_color', False): ... pass ... # console output will not contain color >>> # console output contains color again...
- values()#
 Iterate over configuration item values.