Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
seto77 committed Mar 8, 2023
1 parent 41c20bd commit dbfdc04
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 17 deletions.
7 changes: 2 additions & 5 deletions Crystallography.Controls/Crystal/AtomControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ public Crystal Crystal
DataSet.DataTableAtomDataTable table;
public bool SkipEvent { get; set; } = false;



public bool AtomicPositionError
{
set
Expand Down Expand Up @@ -541,7 +539,6 @@ public void SetToInterface(Atoms atoms)
Occ = atoms.Occ; OccErr = atoms.Occ_err;
#endregion


#region 温度因子関係
UseIsotropy = atoms.Dsf.UseIso;
UseTypeU = atoms.Dsf.OriginalType == DiffuseScatteringFactor.Type.U;
Expand All @@ -553,15 +550,15 @@ public void SetToInterface(Atoms atoms)
Aniso13 = UseTypeU ? atoms.Dsf.U31 * 100 : atoms.Dsf.B31;
Aniso22 = UseTypeU ? atoms.Dsf.U22 * 100 : atoms.Dsf.B22;
Aniso23 = UseTypeU ? atoms.Dsf.U23 * 100 : atoms.Dsf.B23;
Aniso33 = UseTypeU ? atoms.Dsf.U31 * 100 : atoms.Dsf.B31;
Aniso33 = UseTypeU ? atoms.Dsf.U33 * 100 : atoms.Dsf.B33;

IsoErr = UseTypeU ? atoms.Dsf.Uiso_err * 100 : atoms.Dsf.Biso_err * 100;
Aniso11Err = UseTypeU ? atoms.Dsf.U11_err * 100 : atoms.Dsf.B11_err;
Aniso12Err = UseTypeU ? atoms.Dsf.U12_err * 100 : atoms.Dsf.B12_err;
Aniso13Err = UseTypeU ? atoms.Dsf.U31_err * 100 : atoms.Dsf.B31_err;
Aniso22Err = UseTypeU ? atoms.Dsf.U22_err * 100 : atoms.Dsf.B22_err;
Aniso23Err = UseTypeU ? atoms.Dsf.U23_err * 100 : atoms.Dsf.B23_err;
Aniso33Err = UseTypeU ? atoms.Dsf.U31_err * 100 : atoms.Dsf.B31_err;
Aniso33Err = UseTypeU ? atoms.Dsf.U33_err * 100 : atoms.Dsf.B33_err;

#endregion

Expand Down
4 changes: 2 additions & 2 deletions Crystallography.Controls/Crystallography.Controls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<OutputType>Library</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyVersion>2023.3.7.0946</AssemblyVersion>
<FileVersion>2023.3.7.0946</FileVersion>
<AssemblyVersion>2023.3.8.0528</AssemblyVersion>
<FileVersion>2023.3.8.0528</FileVersion>
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
<ApplicationUseCompatibleTextRendering>true</ApplicationUseCompatibleTextRendering>
<ApplicationVisualStyles>true</ApplicationVisualStyles>
Expand Down
4 changes: 2 additions & 2 deletions Crystallography/BetheMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1041,8 +1041,8 @@ Complex Lenz(in PointD k, in PointD kq, in double defocus)
int k = 0;
for (int i = 0; i < bLen; i++)
for (int j = 0; j < bLen; j++)
// U[m][k++] = getU(AccVoltage, qList[m] + Beams[i] - Beams[j], null, detAngleInner, detAngleOuter).Imag;//局所形式の場合 i, jの順番が正解
U[m][k++] = getU(AccVoltage, qList[m], -Beams[i] + Beams[j], detAngleInner, detAngleOuter).Imag;//非局所形式の場合
U[m][k++] = getU(AccVoltage, qList[m] + Beams[i] - Beams[j], null, detAngleInner, detAngleOuter).Imag;//局所形式の場合 i, jの順番が正解
//U[m][k++] = getU(AccVoltage, qList[m], -Beams[i] + Beams[j], detAngleInner, detAngleOuter).Imag;//非局所形式の場合
bwSTEM.ReportProgress((int)(1000.0 * Interlocked.Increment(ref count) / qList.Count), "Calculating U matrix");//状況を報告
if (bwSTEM.CancellationPending) { e.Cancel = true; return; }
});
Expand Down
4 changes: 4 additions & 0 deletions Crystallography/Crystal/ConvertCrystalData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,10 @@ private static Crystal2 ConvertFromCIF(List<string> str)
}
}

if (str[^1].StartsWith("#"))
str[^1] = "#End of data";


//次に'あるいは"で囲まれている文字列中の空白を偶然出てこないような文字列に変換する
for (int n = 0; n < str.Count; n++)
{
Expand Down
4 changes: 2 additions & 2 deletions Crystallography/Crystallography.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<OutputType>Library</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyVersion>2023.3.7.0946</AssemblyVersion>
<FileVersion>2023.3.7.0946</FileVersion>
<AssemblyVersion>2023.3.8.0528</AssemblyVersion>
<FileVersion>2023.3.8.0528</FileVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
7 changes: 3 additions & 4 deletions IPAnalyzer/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3360,7 +3360,6 @@ public void GetProfile(string fileName = "")
SrcAxisMode = IP.Mode,
SrcWaveLength = IP.WaveLength,
Mode = FormProperty.radioButtonConcentric.Checked ? DiffractionProfileMode.Concentric : DiffractionProfileMode.Radial,
Name = FileName
};

var targets = new int[] { -1 };
Expand All @@ -3385,7 +3384,7 @@ public void GetProfile(string fileName = "")
diffractionProfile.SrcWaveLength = UniversalConstants.Convert.EnergyToXrayWaveLength(Ring.SequentialImageEnergy[targets[i]]);
}
if (toolStripButtonImageSequence.Enabled)
diffractionProfile.Name += " " + FileNameSub;
diffractionProfile.Name = FileName + " " + FileNameSub;

//プロファイルを作成
diffractionProfile.OriginalProfile = Ring.GetProfile(IP);
Expand Down Expand Up @@ -3588,9 +3587,9 @@ private void SaveProfile(List<DiffractionProfile> dpList, string filename = "")
foreach (var dp in dpList)
{
var fn = filename;
if (toolStripButtonImageSequence.Enabled && dp.Name.Contains('#'))
if (toolStripButtonImageSequence.Enabled && dp.Name.Contains('#'))//シーケンシャルイメージモードの時
fn += dp.Name[dp.Name.LastIndexOf('#')..].Replace(" ", "");
else if (dpList[0].Name.EndsWith("- whole") && dp.Name.Contains('-'))
else if (dpList[0].Name.EndsWith("-whole") && dp.Name.Contains('-'))//Azimuthal divison モードの時
fn += dp.Name[dp.Name.LastIndexOf('-')..].Replace(" ", "");

if (FormProperty.radioButtonAsPDIformat.Checked)
Expand Down
4 changes: 2 additions & 2 deletions IPAnalyzer/IPAnalyzer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyVersion>2023.3.7.0946</AssemblyVersion>
<FileVersion>2023.3.7.0946</FileVersion>
<AssemblyVersion>2023.3.8.0528</AssemblyVersion>
<FileVersion>2023.3.8.0528</FileVersion>
<ApplicationIcon>App.ico</ApplicationIcon>
<StartupObject>IPAnalyzer.Program</StartupObject>
<DebugType>embedded</DebugType>
Expand Down
1 change: 1 addition & 0 deletions IPAnalyzer/Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ static class Version

static public string History =
"History" +
"\r\n ver3.944(2023/03/07) Fixed a minor bug." +
"\r\n ver3.943(2023/03/07) Fixed bugs on the 'Macro function'." +
"\r\n ver3.942(2023/02/06) Improved 'Auto Procedure'" +
"\r\n ver3.941(2023/01/30) Added: Polygon mask mode for the mask option." +
Expand Down

0 comments on commit dbfdc04

Please sign in to comment.