#!/usr/bin/env python
# -*- coding: utf-8 -*-

import matplotlib.pyplot as plt
from numpy import *
from matplotlib import rcParams
import operator
from matplotlib.ticker import FormatStrFormatter
import argparse

from nema_common import *

def create_label (template, label_old):

    label_new = ""
    tmp = label_old.split('_')

    flag = 0
    for i in xrange(len(tmp)):
        if tmp[i]!=template and tmp[i]!="7mm":
            if tmp[i]=="D75":
                label_new += "D=75cm"
            elif tmp[i]=="D85":
                label_new += "D=85cm"
            elif tmp[i]=="D95":
                label_new += "D=95cm"
            elif tmp[i]=="1lay":
                label_new += "1 layer"
            elif tmp[i]=="2lay":
                label_new += "2 layers"
            elif tmp[i]=="L020":
                label_new += "L=20cm"
            elif tmp[i]=="L050":
                label_new += "L=50cm"
            elif tmp[i]=="L100":