Exemple #1
0
    def get_filters(self):
        cam = get_combo_item(self.cam_combo)
        dates = date_vals[date_keys.index(get_combo_item(self.date_combo))]
        exp = get_combo_item(self.exp_combo)
        zframes = get_combo_item(self.zframe_combo)
        if exp == "None":
            exp = None
        else:
            exp = float(exp)
        filters, condition = self.filters.get_items_and_entry()

        print filters
        return cam, exp, dates, zframes, condition, filters
Exemple #2
0
    def save(self, button):
        print "self =", self
        self._plot(None)

        tab = self.get_tab()
        x, y, c = self.get_xyc()
        image = self.image_spin.get_value_as_int()
        star = self.star_spin.get_value_as_int()

        cmap = get_combo_item(self.cmap_combo)
        cam, exp, dates, zframes, _, filters = self.get_filters()
        hist = self.get_active_tab().get_hist_params()
        print "Saving hist", hist

        save_name = self.save_load_list.child.get_text()

        s = ":".join(map(str, [save_name, tab, x, y, c, image, star, cmap, cam, exp, dates, zframes, hist, filters])) + "\n"
        entries = open(".savefile", "r").readlines()
        
        f = open(".savefile", "w")    
        f.write(s)

        for ent in entries:
            sn = ent.split(":")[0]
            if sn != save_name:
                f.write(ent)        
        f.close()
        self.get_active_tab().f.savefig("/home/timl/thesis/images/%s.eps" % save_name)
Exemple #3
0
def get_combo_cmap(cmap_combo):        
    """
    Return the colourmap object from the combo of colour map names.
    """
    return get_cmap(get_combo_item(cmap_combo))
Exemple #4
0
 def get_xyc(self):
     x_field = get_combo_item(self.x_val_combo)
     y_field = get_combo_item(self.y_val_combo)
     c_field = get_combo_item(self.c_val_combo)
     return x_field, y_field, c_field
Exemple #5
0
def get_combo_cmap(cmap_combo):
    """
    Return the colourmap object from the combo of colour map names.
    """
    return get_cmap(get_combo_item(cmap_combo))