uploader.models.Instrument
- class uploader.models.Instrument(*args, **kwargs)[source]
Model the instrument/device used to measure spectral data.
Instruments are often comprised of both a spectrometer and laser source for which both of these may have their own model and SN, etc.
Note: This is not the collection method of the bio sample but the device used to spectroscopically analyze the biosample.
- id
Database primary key for instrument. Autogenerated if not provided.
- Type:
django.models.UUIDField
- cid
The instrument ID provided by the center.
- Type:
django.models.CharField
- manufacturer
Instrument manufacturer name.
- Type:
django.models.CharField
- model
Instrument model name.
- Type:
django.models.CharField
- serial_number
Instrument serial number (SN#).
- Type:
django.models.CharField
- spectrometer_manufacturer
Spectrometer manufacturer name.
- Type:
django.models.CharField
- spectrometer_model
Spectrometer model name.
- Type:
django.models.CharField
- spectrometer_serial_number
Spectrometer serial number (SN#).
- Type:
django.models.CharField
- laser_manufacturer
Laser manufacturer name.
- Type:
django.models.CharField
- laser_model
Laser model name.
- Type:
django.models.CharField
- laser_serial_number
Laser serial number (SN#).
- Type:
django.models.CharField
- center
The center that this instrument belongs to. If
nullthis instrument belongs to all centers, e.g., one used at a central processing lab.- Type:
django.models.ForeignKeyofuser.models.Center, optional
- __init__(*args, **kwargs)
Methods
__init__(*args, **kwargs)adelete([using, keep_parents])arefresh_from_db([using, fields, from_queryset])asave(*args[, force_insert, force_update, ...])check(**kwargs)clean()Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields.
clean_fields([exclude])Clean all fields and raise a ValidationError containing a dict of all validation errors if any occur.
date_error_message(lookup_type, field_name, ...)delete([using, keep_parents])from_db(db, field_names, values)full_clean([exclude, validate_unique, ...])Call clean_fields(), clean(), validate_unique(), and validate_constraints() on the model.
get_column_names([help_text])get_constraints()get_deferred_fields()Return a set containing names of deferred fields for this instance.
get_next_by_created_at(*[, field, is_next])get_next_by_updated_at(*[, field, is_next])get_previous_by_created_at(*[, field, is_next])get_previous_by_updated_at(*[, field, is_next])parse_fields_from_pandas_series(series)Parse the pandas series for field values returning a dict.
prepare_database_save(field)refresh_from_db([using, fields, from_queryset])Reload field values from the database.
save(*args[, force_insert, force_update, ...])Save the current instance.
save_base([raw, force_insert, force_update, ...])Handle the parts of saving which should be done only once per save, yet need to be done in raw saves, too.
serializable_value(field_name)Return the value of the field name for this instance.
unique_error_message(model_class, unique_check)validate_constraints([exclude])validate_unique([exclude])Check unique constraints on the model and raise ValidationError if any failed.
Attributes
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
center_idA wrapper for a deferred-loading field.
created_atA wrapper for a deferred-loading field.
A wrapper for a deferred-loading field.
A wrapper for a deferred-loading field.
A wrapper for a deferred-loading field.
A wrapper for a deferred-loading field.
A wrapper for a deferred-loading field.
A wrapper for a deferred-loading field.
objectspkA wrapper for a deferred-loading field.
spectral_dataAccessor to the related objects manager on the reverse side of a many-to-one relation.
A wrapper for a deferred-loading field.
A wrapper for a deferred-loading field.
A wrapper for a deferred-loading field.
updated_atA wrapper for a deferred-loading field.