Coder Social home page Coder Social logo

carbon_xs_gui's People

Contributors

lktsui avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

alxpl

carbon_xs_gui's Issues

Porting to Python 3

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.

gcc warnings on Fedora

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.

Undo / Redo / Rollback feature

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.

Keyboard Shortcuts

Many of the interactions should be able to be handled with keyboard shortcuts

  • Open a pattern
  • Open Documentation
  • Calculate
  • Run Fit
  • Stop
  • Undo
  • Redo

Keyboard shortcuts requests

What are some common operations that you would like to see have keyboard shortcuts? Please add them here in this issue.

CarbonXS GUI silently swallows up nonsensical values

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.

Pr Probability of Random stacking will not accept 1.00 when refined value is greater than 1/.0

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

Is that the Freeze Condition problem?

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?

Remember the last used header / separator

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.

Pt in 1 layer mode

Per the manual, CarbonXS overloads the Pt variable to mean:

  • 1 layer model: g - the fraction of low strain carbon.
  • 2 layer model: Pt - the probability of forming 3R type stacking.

This is not made explicit in the UI for the CarbonXS or the CarbonXS GUI program, and we should make it so.

Add support for importing/exporting XRD data formats

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.

"Fit failed due to crash in CarbonXS"

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


Calculation mode difference fit is incorrect because CarbonXS does not load an input pattern

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:

  • Read the x-fit, y-fit values from carbon.dat
  • Interpolate the y-fit values to the x-source values using linear interpolation
  • Subtract using the interpolated values

Optionally fix the graph scaling when redoing the computations.

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.

Persist settings across sessions

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

Documentation Needs

We need documentation for all the following:

  • Basic usage tutorial
  • Tooltips to show meaning of different parameters
  • Well commented code for all functions

No calculated pattern appearing ("Other error occured")

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:
pilt

Does not render properly on my monitor

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.
will not render

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.