Ticket #6968 (closed: fixed)
Convert ConvertInstrumentFile to C++ and enhance
Reported by: | Wenduo Zhou | Owned by: | Wenduo Zhou |
---|---|---|---|
Priority: | critical | Milestone: | Release 3.0 |
Component: | Diffraction | Keywords: | Maintenance |
Cc: | petersonpf@… | Blocked By: | #7739 |
Blocking: | #7126, #7690, #7696, #7813 | Tester: | Russell Taylor |
Description (last modified by Wenduo Zhou) (diff)
Convert algorithm ConvertInstrumentFile to C++.
Consider to rename it to a more self-explanation name.
The default input L1, L2 and 2theta should be re-considered. Make it possible to use 2theta from input .irf file.
Make it possible to import a characterization file to override hard coded d-space range.
A unit test file is required.
Better documentation is expected.
Attachments
Change History
comment:2 Changed 7 years ago by Wenduo Zhou
Add support to NOMAD bank 4. Refs #6968.
Changeset: b97f1907b526fd958274c5089425926b4db4e5ef
comment:3 Changed 7 years ago by Wenduo Zhou
Add new algorithms files. Refs #6968.
Changeset: 79ba74d99fa32c9d7f39df3edb9449b56612a967
comment:4 Changed 7 years ago by Wenduo Zhou
Revert "Add new algorithms files. Refs #6968."
This reverts commit 79ba74d99fa32c9d7f39df3edb9449b56612a967.
Changeset: 62cc62fd56ac04d34aa526fa9b0383fec34834dd
comment:5 Changed 7 years ago by Wenduo Zhou
Revert "Revert "Add new algorithms files. Refs #6968.""
This reverts commit 62cc62fd56ac04d34aa526fa9b0383fec34834dd.
Changeset: 991616fc382775f62c9dd4c1db184a0fa3e02d94
comment:7 Changed 7 years ago by Wenduo Zhou
Remove a temp file and add algorithm file. Refs #6968.
Changeset: 570e1def8cdfe0f2ad660bf3093e39f5a72a78ee
comment:8 Changed 7 years ago by Wenduo Zhou
Checkpointing work. Refs #6968.
Changeset: c62da56f2019014f4780f1c39e69522b991195af
comment:10 Changed 7 years ago by Wenduo Zhou
Checkpointing work. Refs #6968.
Changeset: 349cf775f6ab3e6cc14b1a8e778aa7457303d357
comment:11 Changed 7 years ago by Wenduo Zhou
Resolved conflict. Refs #6968.
Changeset: f682a98d732ae3fcda4a446b9c7153080a1a91a2
comment:12 Changed 7 years ago by Wenduo Zhou
Checkpointing work. Refs #6968.
Changeset: f4b60b95096e2a91417ff3e932b70310fc034171
comment:13 Changed 7 years ago by Wenduo Zhou
Checkpointing work. Refs #6968.
Changeset: 5c733adfeac731ddfbc5f005a36fae11833c865f
comment:14 Changed 7 years ago by Wenduo Zhou
Checkpointing work. Refs #6968.
Changeset: 146bdbf89228b4368b7bbe0b830f8cde72ae0934
comment:15 Changed 7 years ago by Wenduo Zhou
Fixed a minor bug. Refs #6968.
Changeset: d09b7e4869cf84b00aece567dd9d8c86f17c2156
comment:16 Changed 7 years ago by Wenduo Zhou
Checkpointing work. Refs #6968.
Changeset: 011e0c6835e5dc99cc735f3d135c35b5410e3108
comment:20 Changed 7 years ago by Nick Draper
- Priority changed from major to critical
- Keywords Maintenance added
comment:21 Changed 7 years ago by Wenduo Zhou
- Description modified (diff)
- Milestone changed from Release 2.6 to Release 3.0
comment:23 Changed 7 years ago by Gesner Passos
- Blocking 7690 added
comment:25 Changed 7 years ago by Russell Taylor
- Blocking 7126 added
comment:27 Changed 7 years ago by Wenduo Zhou
Checkpointing work. Refs #6968.
Changeset: ff7a0a8453c74fb2028096163fec37fcddcf7fd8
comment:29 Changed 7 years ago by Wenduo Zhou
Checkpointing work till largely finished. Refs #6968.
Changeset: 93c0c040d19a0147ad42ebf073b6257df5fe9b59
comment:30 Changed 7 years ago by Wenduo Zhou
Checkpointing work. Refs #6968.
Changeset: fcaf70b8aaa454694cfe766ef9be5320424d0b89
comment:31 Changed 7 years ago by Wenduo Zhou
Fixed some compilation error. Refs #6968.
Changeset: a07298540a3ad80d0888c550ea0e6693760ed33e
comment:32 Changed 7 years ago by Wenduo Zhou
Checkpointing work. Refs #6968.
Changeset: 8c581c2bccaba51d39a35405825a9d60b01ecc6b
comment:33 Changed 7 years ago by Wenduo Zhou
Checkpointing work. Refs #6968.
Changeset: 089b0493245a2c55ad851b10f2d7f5d29de6cf87
comment:34 Changed 7 years ago by Wenduo Zhou
Fixed some issues found in unit test. Refs #6968.
Changeset: 17d276125dedb0598d3f46445281ba57708fd3ee
comment:35 Changed 7 years ago by Wenduo Zhou
Fixed an error. Refs #6968.
Changeset: a2128c5fbfc19485353322535d8735bcf3b22749
comment:36 Changed 7 years ago by Wenduo Zhou
For unit test of windows. Refs #6968.
Changeset: cad4c7db19df4c31fd0d4b5db24d0549a9de9ae5
comment:37 Changed 7 years ago by Wenduo Zhou
Instruction to verify the ticket
The purpose of this ticket to replace the original ConvertInstrumentFile by a C++ algorithm (named SaveGSASInstrumentFile now). The original python algorithm has been proved correct though it lacks of the unit test. Therefore, the best way to verify this ticket is to compare the result generated by ConvertInstrumentFile() and SaveGSASInstrumentFile().
- Download the attached pg3_60hz.irf
- Run ConvertInstrumentFile() with Instrument='PG3', ChopperFrequency='60', BanksID='2', L1=60.0, TwoTheta = 90.0 and arbitrary input for IDLine and Sample. This will generate a 1-bank (for bank 2 in this case) GSAS instrument file;
- Run SaveGSASInstrumentFile() with the same setup as step 2.
- Use Linux command 'diff'/'meld' to compare the .prm file generated by these 2 algorithms. There should be only 3 lines different. The only difference in data value lies in a long integer, which is a random number required by GSAS indeed.
- Repeat step 2 to 4 with multiple banks, such as BanksID = '1-7' (or just leave it bank).
comment:38 Changed 7 years ago by Wenduo Zhou
Added the 2nd unit test. Refs #6968.
Changeset: ea9f61ab1f977e31ea30cf30e8c4b0a10e8bce12
comment:39 Changed 7 years ago by Wenduo Zhou
Completed unit test. Refs #6968.
Changeset: 39ebb37a526d4f45a7e59333e0493e7d7f11defb
comment:40 Changed 7 years ago by Wenduo Zhou
Fixed a bug and cleaned code. Refs #6968.
Changeset: 8bfb90e7a3d03dbecce512a4a8c98db3ec2fa852
comment:41 Changed 7 years ago by Wenduo Zhou
- Status changed from inprogress to verify
- Resolution set to fixed
comment:42 Changed 7 years ago by Russell Taylor
- Status changed from verify to verifying
- Tester set to Russell Taylor
comment:43 Changed 7 years ago by Russell Taylor
- Status changed from verifying to reopened
- Resolution fixed deleted
A few things need addressing:
- The items in the code that we discussed
- The doxygen warnings shown here
- Improve the documentation to explain the instruments that the algorithm applies to
comment:45 Changed 7 years ago by Wenduo Zhou
- Status changed from reopened to inprogress
Improved code quality. Refs #6968.
Changeset: 676c029bfb2b6301201857f94fc95c828674eea6
comment:46 Changed 7 years ago by Wenduo Zhou
- Status changed from inprogress to verify
- Resolution set to fixed
comment:48 Changed 7 years ago by Wenduo Zhou
Elimated doxygen error. Refs #6968.
Changeset: 5f7e707df7b2068ebf3ad8991ff621d1f5d180fc
comment:49 Changed 7 years ago by Wenduo Zhou
Fixed the last doxygen error. Refs #6968.
Changeset: c6ffa7182a03ec66d1803d241823f94f1a0ca19a
comment:50 Changed 7 years ago by Russell Taylor
- Status changed from verifying to closed
All good now.
comment:52 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 7814