Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better default values #287

Merged
merged 11 commits into from
Jan 26, 2022
16 changes: 8 additions & 8 deletions src/gudrun_classes/beam.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ def __init__(self):
self.stepSizeMS = 0.0
self.noSlices = 0
self.angularStepForCorrections = 0
self.incidentBeamLeftEdge = 0.0
self.incidentBeamRightEdge = 0.0
self.incidentBeamTopEdge = 0.0
self.incidentBeamBottomEdge = 0.0
self.scatteredBeamLeftEdge = 0.0
self.scatteredBeamRightEdge = 0.0
self.scatteredBeamTopEdge = 0.0
self.scatteredBeamBottomEdge = 0.0
self.incidentBeamLeftEdge = -1.5
self.incidentBeamRightEdge = 1.5
self.incidentBeamTopEdge = 1.5
self.incidentBeamBottomEdge = -1.5
self.scatteredBeamLeftEdge = -2.0
self.scatteredBeamRightEdge = 2.0
self.scatteredBeamTopEdge = 2.0
self.scatteredBeamBottomEdge = -2.0
self.filenameIncidentBeamSpectrumParams = ""
self.overallBackgroundFactor = 0.0
self.sampleDependantBackgroundFactor = 0.0
Expand Down
10 changes: 5 additions & 5 deletions src/gudrun_classes/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,18 @@ def __init__(self):
self.dataFiles = DataFiles([], "CONTAINER")
self.composition = Composition("CONTAINER")
self.geometry = Geometry.SameAsBeam
self.upstreamThickness = 0.0
self.downstreamThickness = 0.0
self.upstreamThickness = 0.1
self.downstreamThickness = 0.1
self.angleOfRotation = 0.0
self.sampleWidth = 0.0
self.sampleWidth = 5.0
self.innerRadius = 0.0
self.outerRadius = 0.0
jswift-stfc marked this conversation as resolved.
Show resolved Hide resolved
self.sampleHeight = 0.0
self.density = 0.0
self.density = 0.1
jswift-stfc marked this conversation as resolved.
Show resolved Hide resolved
self.densityUnits = UnitsOfDensity.ATOMIC
self.totalCrossSectionSource = CrossSectionSource.TABLES
self.crossSectionFilename = ""
self.tweakFactor = 0.0
self.tweakFactor = 1.0
self.scatteringFraction = 0.0
self.attenuationCoefficient = 0.0

Expand Down
31 changes: 18 additions & 13 deletions src/gudrun_classes/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,35 +107,35 @@ def __init__(self):
self.name = ""
self.periodNumber = 1
self.dataFiles = DataFiles([], "SAMPLE")
self.forceCalculationOfCorrections = False
self.forceCalculationOfCorrections = True
self.composition = Composition("SAMPLE")
self.geometry = Geometry.SameAsBeam
self.upstreamThickness = 0.0
self.downstreamThickness = 0.0
self.upstreamThickness = 0.05
self.downstreamThickness = 0.05
self.angleOfRotation = 0.0
self.sampleWidth = 0.0
self.sampleWidth = 5.0
self.innerRadius = 0.0
self.outerRadius = 0.0
self.sampleHeight = 0.0
self.density = 0.0
self.density = 0.1
self.densityUnits = UnitsOfDensity.ATOMIC
self.tempForNormalisationPC = 0.0
self.totalCrossSectionSource = CrossSectionSource.TRANSMISSION
self.crossSectionFilename = ""
self.sampleTweakFactor = 0.0
self.topHatW = 0.0
jswift-stfc marked this conversation as resolved.
Show resolved Hide resolved
self.FTMode = FTModes.SUB_AVERAGE
self.sampleTweakFactor = 1.0
self.topHatW = 3.0
self.FTMode = FTModes.ABSOLUTE
self.minRadFT = 0.0
jswift-stfc marked this conversation as resolved.
Show resolved Hide resolved
self.grBroadening = 0.0
self.resonanceValues = []
self.exponentialValues = []
self.normalisationCorrectionFactor = 0.0
self.exponentialValues = [0, 1]
self.normalisationCorrectionFactor = 1.0
self.fileSelfScattering = ""
self.normaliseTo = NormalisationType.NOTHING
self.maxRadFT = 0.0
self.maxRadFT = 20.0
self.outputUnits = OutputUnits.BARNS_ATOM_SR
self.powerForBroadening = 0.0
self.stepSize = 0.0
self.stepSize = 0.03
self.runThisSample = True
self.scatteringFraction = 0.0
self.attenuationCoefficient = 0.0
Expand Down Expand Up @@ -239,8 +239,13 @@ def __str__(self):
)
)

selfScatteringFile = (
self.fileSelfScattering
if self.fileSelfScattering else "*"
)

selfScatteringLine = (
f'{self.fileSelfScattering}{TAB}'
f'{selfScatteringFile}{TAB}'
f'Name of file containing self scattering'
f' as a function of wavelength [\u212b]\n'
)
Expand Down
8 changes: 4 additions & 4 deletions src/gui/widgets/ui_files/mainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</sizepolicy>
</property>
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="instrumentPage">
<layout class="QVBoxLayout" name="verticalLayout_9">
Expand Down Expand Up @@ -3930,7 +3930,7 @@
</sizepolicy>
</property>
<property name="suffix">
<string> cm</string>
<string> °</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -6221,7 +6221,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Scattering Fraction</string>
<string>Background Scattering Fraction</string>
</property>
</widget>
</item>
Expand All @@ -6248,7 +6248,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Attenuation Coefficient</string>
<string>Background Attenuation Coefficient</string>
</property>
</widget>
</item>
Expand Down