Skip to content

Commit

Permalink
fixing issues with imping flux units (#40)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Goette <[email protected]>
  • Loading branch information
RoteKekse and Michael Goette authored May 28, 2024
1 parent 8d59a57 commit 0e617a9
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 21 deletions.
46 changes: 36 additions & 10 deletions src/nomad_material_processing/vapor_deposition/pvd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,23 @@ class SourcePower(TimeSeries):
y='value',
),
)
value = TimeSeries.value.m_copy()
value.unit = 'watt'
set_value = TimeSeries.set_value.m_copy()
set_value.unit = 'watt'

value = Quantity(
type=float,
unit='watt',
shape=['*'],
)
set_value = Quantity(
type=float,
description='The set value(s) (i.e. the intended values) set.',
shape=['*'],
unit='watt',
a_eln=ELNAnnotation(
component=ELNComponentEnum.NumberEditQuantity,
label='Set value',
defaultDisplayUnit='watt',
),
)


class PVDEvaporationSource(EvaporationSource):
Expand Down Expand Up @@ -105,10 +118,23 @@ class ImpingingFlux(TimeSeries):
component=ELNComponentEnum.EnumEditQuantity,
),
)
value = TimeSeries.value.m_copy()
value.unit = 'mol/meter ** 2/second'
set_value = TimeSeries.set_value.m_copy()
set_value.unit = 'mol/meter ** 2/second'

value = Quantity(
type=float,
unit='mol/meter ** 2/second',
shape=['*'],
)
set_value = Quantity(
type=float,
description='The set value(s) (i.e. the intended values) set.',
shape=['*'],
unit='mol/meter ** 2/second',
a_eln=ELNAnnotation(
component=ELNComponentEnum.NumberEditQuantity,
label='Set value',
defaultDisplayUnit='mol/meter ** 2/second',
),
)


class PVDSource(VaporDepositionSource):
Expand All @@ -117,11 +143,11 @@ class PVDSource(VaporDepositionSource):
dict(
x=[
'vapor_source/power/time',
'impinging_flux/time',
'impinging_flux/:/time',
],
y=[
'vapor_source/power/value',
'impinging_flux/value',
'impinging_flux/:/value',
],
),
],
Expand Down
38 changes: 27 additions & 11 deletions src/nomad_material_processing/vapor_deposition/pvd/thermal.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
PhysicalVaporDeposition,
)

from nomad.datamodel.metainfo.annotations import (
ELNAnnotation,
ELNComponentEnum,
)

if TYPE_CHECKING:
from nomad.datamodel.datamodel import (
EntryArchive,
Expand All @@ -59,11 +64,22 @@ class ThermalEvaporationHeaterTemperature(TimeSeries):
y='value',
),
)
value = TimeSeries.value.m_copy()
value.unit = 'kelvin'
set_value = TimeSeries.set_value.m_copy()
set_value.unit = 'kelvin'
set_value.a_eln.defaultDisplayUnit = 'celsius'
value = Quantity(
type=float,
unit='kelvin',
shape=['*'],
)
set_value = Quantity(
type=float,
description='The set value(s) (i.e. the intended values) set.',
shape=['*'],
unit='kelvin',
a_eln=ELNAnnotation(
component=ELNComponentEnum.NumberEditQuantity,
label='Set value',
defaultDisplayUnit='celsius',
),
)


class ThermalEvaporationHeater(PVDEvaporationSource):
Expand Down Expand Up @@ -102,11 +118,11 @@ class ThermalEvaporationSource(PVDSource):
m_def = Section(
a_plot=dict(
x=[
'impinging_flux/time',
'impinging_flux/:/time',
'vapor_source/temperature/time',
],
y=[
'impinging_flux/value',
'impinging_flux/:/value',
'vapor_source/temperature/value',
],
lines=[
Expand Down Expand Up @@ -134,8 +150,8 @@ class ThermalEvaporationStep(PVDStep):
m_def = Section(
a_plot=[
dict(
x='sources/:/impinging_flux/time',
y='sources/:/impinging_flux/value',
x='sources/:/impinging_flux/:/time',
y='sources/:/impinging_flux/:/value',
),
dict(
x='sources/:/vapor_source/temperature/time',
Expand Down Expand Up @@ -173,8 +189,8 @@ class ThermalEvaporation(PhysicalVaporDeposition):
links=['http://purl.obolibrary.org/obo/CHMO_0001360'],
a_plot=[
dict(
x='steps/:/sources/:/impinging_flux/time',
y='steps/:/sources/:/impinging_flux/value',
x='steps/:/sources/:/impinging_flux/:/time',
y='steps/:/sources/:/impinging_flux/:/value',
),
dict(
x='steps/:/sources/:/vapor_source/temperature/time',
Expand Down

0 comments on commit 0e617a9

Please sign in to comment.