Esempio n. 1
0
 def download_data_model(self):
     pmag_dir = check_updates.get_pmag_dir()
     model_file = os.path.join(pmag_dir, '3_0', 'data_model_August_4_2016.json')
     f = open(model_file, 'r')
     string = '\n'.join(f.readlines())
     raw = json.loads(unicode(string, errors='ignore'))
     full = DataFrame(raw)
     return full
    def on_helpButton(self, event, page=None):
        """shows html help page"""
        # for use on the command line:
        path = check_updates.get_pmag_dir()

        # for use with pyinstaller
        #path = self.main_frame.resource_dir

        html_frame = pw.HtmlFrame(self, page=(os.path.join(path, 'help_files', page)))
        html_frame.Show()
Esempio n. 3
0
 def on_helpButton(self, event):
     #for use on the command line
     path = check_updates.get_pmag_dir()
     
     # for use with pyinstaller:
     #path = self.Parent.resource_dir
     
     html_frame = pw.HtmlFrame(self, page=(os.path.join(path, "help_files", "ErMagicHeadersHelp.html")))
     html_frame.Center()
     html_frame.Show()
Esempio n. 4
0
 def on_helpButton(self, event):
     #for use on the command line
     path = check_updates.get_pmag_dir()
     # for use with pyinstaller:
     #path = self.Parent.resource_dir
     help_page = os.path.join(path, 'dialogs', 'help_files', 'ErMagicBuilderHelp3.html')
     # if using with py2app, the directory structure is flat,
     # so check to see where the resource actually is
     if not os.path.exists(help_page):
         help_page = os.path.join(path, 'help_files', 'ErMagicBuilderHelp3.html')
     html_frame = pw.HtmlFrame(self, page=help_page)
     html_frame.Center()
     html_frame.Show()
Esempio n. 5
0
#!/usr/bin/env python
import os
from os import path
from mpl_toolkits.basemap import basemap_datadir
from pmagpy import check_updates
pmag_dir = check_updates.get_pmag_dir()
print "installing etopo20 files from ", path.join(pmag_dir, 'data_files', 'etopo20', 'etopo20*')
print "to the basemap data directory: ",basemap_datadir
command='cp ' + path.join(pmag_dir, 'data_files', 'etopo20', 'etopo20*')  + " "+ basemap_datadir
os.system(command)
global CURRENT_VERSION, PMAGPY_DIRECTORY
CURRENT_VERSION = "v.0.33"
import pmagpy.check_updates as check_updates
PMAGPY_DIRECTORY = check_updates.get_pmag_dir()
import wx,os,sys
from copy import copy
from numpy import vstack,sqrt
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigCanvas
from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg as NavigationToolbar
from pmagpy.demag_gui_utilities import *
from pmagpy.Fit import *


class InterpretationEditorFrame(wx.Frame):

    #########################Init Funcions#############################

    def __init__(self,parent):
        """Constructor"""
        #set parent and resolution
        self.parent = parent
        self.GUI_RESOLUTION=self.parent.GUI_RESOLUTION
        #call init of super class
        wx.Frame.__init__(self, self.parent, title="Interpretation Editor",size=(675*self.GUI_RESOLUTION,425*self.GUI_RESOLUTION))
        self.Bind(wx.EVT_CLOSE, self.on_close_edit_window)
        #make the Panel
        self.panel = wx.Panel(self,-1,size=(700*self.GUI_RESOLUTION,450*self.GUI_RESOLUTION))
        #set icon
        icon = wx.EmptyIcon()
        icon.CopyFromBitmap(wx.Bitmap(os.path.join(PMAGPY_DIRECTORY, "images/PmagPy.ico"), wx.BITMAP_TYPE_ANY))
        self.SetIcon(icon)