GithubHelp home page GithubHelp logo

barronh / permm Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 5.0 3.95 MB

Python Environment for Reaction Mechanisms/Mathematics provides dynamic analysis tools for evaluating chemical networks easily.

Python 99.89% Makefile 0.11%

permm's People

Contributors

barronh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

permm's Issues

plot_rxns doesn't work for many products

I have tried to use plot_rxns for the O3 product by python -m permm --gui test.mrg.nc.

Steps:
I selected nothing in the "Select Rectants" column and checked "AND", then chose O3 in the "Select Products" column.

Error info:

Traceback (most recent call last):
  File "/home/xin/miniconda3/envs/python37/lib/python3.8/tkinter/__init__.py", line 1883, in __call__
    return self.func(*args)
  File "/home/xin/miniconda3/envs/python37/lib/python3.8/site-packages/permm-1.0-py3.8.egg/permm/guis/SimpleTk.py", line 87, in execute
    getattr(self.mech, method)(**thiskwds)
  File "/home/xin/miniconda3/envs/python37/lib/python3.8/site-packages/permm-1.0-py3.8.egg/permm/core/Mechanism.py", line 597, in plot_rxns
    reactions = [(rxn.sum()[plot_spc], rxn) for rxn in reactions]
  File "/home/xin/miniconda3/envs/python37/lib/python3.8/site-packages/permm-1.0-py3.8.egg/permm/core/Mechanism.py", line 597, in <listcomp>
    reactions = [(rxn.sum()[plot_spc], rxn) for rxn in reactions]
AttributeError: 'str' object has no attribute 'sum'

I printed the reactions before the rxn.sum():

reactions = [(rxn.sum()[plot_spc], rxn) for rxn in reactions]

Here's the output:

['RXN_02', 'RXN_92', 'RXN_108']

This issue exists for many products (O, O3, H2O2, NO, etc).

Unsuitable variable name "list" as the input

def _get_species(self, list):

I guess you use some package to convert the py2 script into py3.
As you can see, it uses list(map ...) to convert the results into list, you have to rename the list passd in, like this:

    def _get_species(self, species_list):
        items = species_list.curselection()
        try: items = list(map(int, items))
        except: pass
        items = list(map(lambda i, d = self.species_objects: d[i], items))
        return items

Otherwise, list(map ...) will use the Listbox which is species_list in my revision.

wrong args passed to pncparse

ifiles, pncoptions = pncparse(has_ofile = False, interactive = True, parser = pncparser, args = args.pseudonetcdf)

args.pseudonetcdf shoud be options.pseudonetcdf.

Error log:

Traceback (most recent call last):
  File "main.py", line 84, in <module>
    parse_and_run()
  File "main.py", line 28, in parse_and_run
    ifiles, pncoptions = pncparse(has_ofile = False, interactive = True, parser = pncparser, args = args.pseudonetcdf)
NameError: name 'args' is not defined

'permm' is a package and cannot be directly executed.

What steps will reproduce the problem?
1. Running permm with "python -m permm"

What is the expected output? What do you see instead?
Anything that's not an error, really...

What version of the product are you using? On what operating system?
Latest version as of June 2011, with Python 2.7.1+ on Ubuntu 11.04 86x64

Please provide any additional information below.

I followed the install instructions, installed NetCDF and HDF5 using Aptitude, 
installed PseudoNetCDF and NetCDF4.

I cannot seem to run Permm, no matter what I try, I get an error about 'permm' 
being a package.  For example, trying step 2 of the 
[http://code.google.com/p/permm/wiki/TutorialPlotGUI tutorial]:

matt@khea:permm-1.0rc$ python -m permm -g /tmp/cmaq.base
/usr/bin/python: No module named permm.__main__; 'permm' is a package and 
cannot be directly executed


The install seems to have gone fine:

matt@khea:permm-1.0rc$ sudo python setup.py install
running install
running build
running build_py
copying src/permm/netcdf.py -> build/lib.linux-x86_64-2.7/permm
running install_lib
copying build/lib.linux-x86_64-2.7/permm/netcdf.py -> 
/usr/local/lib/python2.7/dist-packages/permm
byte-compiling /usr/local/lib/python2.7/dist-packages/permm/netcdf.py to 
netcdf.pyc
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/permm-1.0rc.egg-info
Writing /usr/local/lib/python2.7/dist-packages/permm-1.0rc.egg-info


Or, the verbose install log which is attached.

Original issue reported on code.google.com by [email protected] on 21 Jun 2011 at 5:43

Attachments:

change the units for primary y-axis and secondary y-axis

What steps will reproduce the problem?
1. Get pyPA output 
2. Use permm to create processes plot from pyPA output(such as test.mrg.nc)
3. Display the plot

What is the expected output? What do you see instead?
The unit of the secondary y-axis shows ppmV/time, it should be ppmV. The unit 
for the primary y-axis is missing.  

What version of the product are you using? On what operating system?
permm-1.0rc-py2.6

Please provide any additional information below.

None

Original issue reported on code.google.com by [email protected] on 16 Jun 2010 at 6:32

plotting specific reactions

It would be nice to be able to plot specific reactions based on reaction
number if known (e.g. plot_rxns(IRR_1, ...) ) as well as combine reactions
using a syntax similar to the mathematical processing for species (e.g. NOx
= NO + NO2, rxns_1 = IRR_1 + IRR_2) and be able to plot those as well (e.g.
plot_rxns(rxns_1, ...) ).

Original issue reported on code.google.com by [email protected] on 20 May 2010 at 2:29

species negation error

1. from permm.SpeciesGroup import Sepcies
2. OH = Species(names = ['OH'], stoic = [1])
3. print (-OH).exclude

What is the expected output?
False

What do you see instead?
0

This was an error in the reimplementation of Species from dict to object. 
I have made the update that fixes Species.



Original issue reported on code.google.com by [email protected] on 21 May 2010 at 6:22

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.