lktsui / carbon_xs_gui Goto Github PK
View Code? Open in Web Editor NEWA GUI Front-end to CarbonXS
License: GNU General Public License v3.0
A GUI Front-end to CarbonXS
License: GNU General Public License v3.0
Support for Python 2.x will stop upstream at the end of the year. As a result, linux distributions and other interested parties have been steadily phasing out python2 by dropping packages and rewriting tools.
As far as CarbonXS GUI is concerned, all of its dependencies have been ported to Python 3, so a big hurdle has been cleared. The Conservative Python 3 Porting Guide is a valuable resource for developers who want to port their code to python3. I ran python-modernize, a tool mentioned in the guide and I was able to run CarbonXS GUI with no manual changes - the vast majority of the alterations were print() statements, so porting the program should be a pretty straightforward process.
Hello,
I was interested in packaging CarbonXS GUI for fedora and I started by looking into the compilation of the Fortran code (gcc-gfortran-8.2.1 on Fedora 29). Fedora has a default set of compiler flags for C, C++ and Fortran, which should be used for the compilation of all executables.
In the case of F29, these are:
$ rpm --eval %{optflags}
-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
Using these, the compilation completes, albeit with a bunch of warnings, e.g.:
f951: Warning: Nonconforming tab character in column 1 of line 47 [-Wtabs]
[…]
carbon.cmn:11:14:
LOGICAL DERIV
1
Warning: Nonconforming tab character at (1) [-Wtabs]
[…]
CARBONXS.FOR:1176:72:
PAUSE 'Improper permutation in LISTA'
1
Warning: Deleted feature: PAUSE statement at (1)
[…]
CARBONXS.FOR:945:25:
E1PIL =EXP(CMPLX(0.0D0,1*PI*L))
1
Warning: Conversion from REAL(8) to default-kind COMPLEX(4) at (1) might lose precision, consider using the KIND argument [-Wconversion]
[…]
CARBONXS.FOR:1090:21:
INTEGER N,ILS,IS,I,IU
1
Warning: Unused variable ‘ils’ declared at (1) [-Wunused-variable]
[…]
CARBONXS.FOR:849:0:
DD002=DD002+(DGDL*CS+G*DCSDL)*ET*POC*DLDD
Warning: ‘dldd’ may be used uninitialized in this function [-Wmaybe-uninitialized]
and so on. In addition to the above, when the program is run, this appears at the end of its output:
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO IEEE_OVERFLOW_FLAG IEEE_UNDERFLOW_FLAG IEEE_DENORMAL
Now, to be honest, I haven't touched any Fortran code in over a decade, nor have I kept an eye on any developments during this time, so I am the least qualified person to give advice, but I think it would be worth it weeding out the false positives and hardening the code.
Fedora 30 comes with GCC9, which carries a host of new features and modifications and I intend to check what happens there as well.
We should add the ability to rollback to the previous fit and go to the next fit (Similar to undo/redo in editing programs).
Add two arrows at the top and use them for forward and backward editing.
Traceback (most recent call last):
File "CarbonXS_GUI.py", line 192, in open_pattern
IOError: [Errno 22] invalid mode ('r') or filename: u''
Tab order in 1.3.0 is broken.
Many of the interactions should be able to be handled with keyboard shortcuts
What are some common operations that you would like to see have keyboard shortcuts? Please add them here in this issue.
For instance, Pr and Pt may occasionally be optimized to values outside of [0,1] and the program will silently suppress these values to 0.0.
We should load these values and verify that they are not meaningful, warning the user if something is wrong instead.
When a refinement of a coke xrd pattern the Pr value will exceed 1.0 in value and give an error message that Pr is greater than 1. When I enter a value of 1, 1.0, 1.00 etc, the program will end with "Singular Matrix" code. However, if I enter the value "0.99999" the program proceeds with the refinement. It is time consuming entering "0.99999" every tiime thlis occurs instead of jjust entering "1" instead.
Thanks
We should include one of the fonts from Google fonts so everyone has the same font.
Many thanks to you for sharing the program. When I attempted to use it, the data and fitting parameters of the example in the package are used. After click the "Start Fitting" button, a sentence is shown on the window: "Windows detected - calling carbonxs_gfortran.exe". Then nothing happens after that. I have to stop the process. Is that the Freeze condition problem?
A user working with a number of files is likely to be using the same format over and over again. We should have the program remember what header / separator settings they last used when a new file is open.
Large parameter values will cause the carbon.inp file to mis-align. We should use scientific notation for writing to carbon.inp to avoid this.
Per the manual, CarbonXS overloads the Pt variable to mean:
This is not made explicit in the UI for the CarbonXS or the CarbonXS GUI program, and we should make it so.
It would be nice to support natively importing data formats from the XRD systems that are commonly used.
Please use this issue to request data formats that you want CarbonXS to support by attaching an example diffraction pattern.
I am getting chronic failures when the program is writing the carbon.out file. It successfully completes the fit and writes some or all of the carbon.out file before crashing. I'm able to directly go into the carbon.out file to extract the data, but the majority of the time it isn't completing.
I have restarted the program and my computer. I have also set the CarbonXS folder as an exclusion from my AV and tried completely disabling my AV with no change. This happens with multiple samples, so it's not one glitchy file.
-Mike
Iter # Chi^2 Alambda
1 13.75015 .10E-01
2 13.75015 .10E+00
3 9.96214 .10E-01
4 9.96214 .10E+00
5 8.45746 .10E-01
6 8.45746 .10E+00
7 8.45746 .10E+01
8 8.45746 .10E+02
9 8.45746 .10E+03
10 8.45746 .10E+04
11 8.11272 .10E+03
12 8.11272 .10E+04
13 8.11272 .10E+05
14 7.99601 .10E+04
15 7.99601 .10E+05
Final Parameters
Old Value New Value(esd) Description
CarbonXS.exe Process Complete
Error: Fit failed due to crash in CarbonXS
CarbonXS does not read in a dataset when running in calculation mode, so the output carbon.dat file does not include a set of source values to compare against.
Furthermore, the x-values may not match the currently loaded source file.
We should proceed as follows:
Somewhere in the program we should display what the filename we are working with is.
Attempting to tab through the settings results in going through in a seemingly random order.
Export the following data:
Fitting parameters
Loss function values
Fit results
It's hard to see the plot difference in linear scale. Make the default log-scale.
Feature request received:
Would it be possible for you add a checkbox on the main page that would prevent the graph from rescaling the axis when a new calculation is done? That way you could just change parameters like Pr and Pt and hit the calculator button to see how it changes the profile and fit.
For combine CarbonXS with Jade to perform a combined fit of carbon and a crystalline material.
The following should be persisted across sessions:
Lock X
Lock Y
Show Previous Fit
Last Separator Used for Data Load
Last Header Lines Number used for Data Load
The Rigaku miniflex format reported in #11 is a format that contains a header line and the data in two column format beneath. We should add support for loading an arbitrary number of header lines.
We need documentation for all the following:
Things that need updating:
I'm a new user and just started working with CarbonXS. I downloaded all the Dependencies and Microsoft Visual C++ stuff and ran the CarbonXS installer. I was able to load my data in the program and to change parameters, but clicking the button "calculate pattern with current parameters" resulted in a note "Other error occured" and there is no calculated pattern visible.
I also clicked the fitting button, nothing happened again.
What might be the problem? I'm quite clueless here..
Here is a screenshot from the log window:
CarbonXS won't fit if the dataset has over 3600 data points
Sanity check looks at Pr instead of DWF and PO when flagging negative values.
The program does not render properly on my Microsoft Surface Pro 4. The native resolution is 2736x1824. It has worked properly on my other laptop and desktops. I have tried adjusting the display settings (text size and general app sizing), but none of them appear to affect the size of the text in the GUI.
CarbonXS writes ************* if there is insufficient space to write data to in Carbon.inp.
We should read from carbon.out where the full version of the data is output either to start with or as a fallback mechanism.
We should preserve the settings of the fit settings and diffractometer settings panels in the fit results buffer.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.