Skip to content

Commit

Permalink
default project
Browse files Browse the repository at this point in the history
  • Loading branch information
andped10 committed Sep 30, 2024
1 parent 0c239d7 commit e6fee4c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/easyreflectometry/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
from easyscience.fitting import AvailableMinimizers

from easyreflectometry.data.data_store import DataSet1D
from easyreflectometry.model import Model
from easyreflectometry.model import ModelCollection
from easyreflectometry.sample import Layer
from easyreflectometry.sample import MaterialCollection
from easyreflectometry.sample import Multilayer
from easyreflectometry.sample import Sample
from easyreflectometry.sample.collections.base_collection import BaseCollection


Expand Down Expand Up @@ -103,6 +107,26 @@ def remove_material(self, index: int) -> None:
else:
self._materials.pop(index)

def default(self):
self.reset()
self._materials = MaterialCollection()
layers = [
Layer(material=self._materials[0], thickness=0.0, roughness=0.0, name='Vacuum Layer'),
Layer(material=self._materials[1], thickness=100.0, roughness=3.0, name='Multi-layer'),
Layer(material=self._materials[2], thickness=0.0, roughness=1.2, name='Si Layer'),
]
items = [
Multilayer(layers[0], name='Superphase'),
Multilayer(layers[1], name='Multi-layer'),
Multilayer(layers[2], name='Subphase'),
]
sample = Sample(*items)
sample[0].layers[0].thickness.enabled = False
sample[0].layers[0].roughness.enabled = False
sample[-1].layers[-1].thickness.enabled = False

self._models.append(Model(sample=sample))

def _defalt_info(self):
return dict(
name='Example Project',
Expand Down

0 comments on commit e6fee4c

Please sign in to comment.