added interface for predefined colormaps
This commit is contained in:
parent
92654dc2cd
commit
bb677a26aa
|
@ -23,13 +23,16 @@ parser.add_option('-r','--right', dest='right', type='float', nargs=3, \
|
|||
help='right color [%default]')
|
||||
parser.add_option('-c','--colormodel', dest='colormodel', \
|
||||
help='colormodel of left and right "RGB","HSL","XYZ","CIELAB","MSH" [%default]')
|
||||
parser.add_option('-p','--predefined', dest='predefined', \
|
||||
help='predefined colormap [%default]')
|
||||
parser.add_option('-f','--format', dest='format', action='extend', \
|
||||
help='output file format "paraview","gmsh","raw","GOM",[paraview, autodetect if output file extension is given]')
|
||||
parser.add_option('-s','--steps', dest='steps', type='int', nargs = 1, \
|
||||
help='no of interpolation steps [%default]')
|
||||
help='number of interpolation steps [%default]')
|
||||
parser.add_option('-t','--trim', dest='trim', type='float', nargs = 2, \
|
||||
help='trim the colormap w.r.t the given values [%default]')
|
||||
parser.set_defaults(colormodel = 'RGB')
|
||||
parser.set_defaults(predefined = None)
|
||||
parser.set_defaults(format = [''])
|
||||
parser.set_defaults(steps = 10)
|
||||
parser.set_defaults(trim = (-1.0,1.0))
|
||||
|
@ -141,7 +144,7 @@ elif (len(filenames)> 0) and (options.format == ['']):
|
|||
|
||||
leftColor = damask.Color(options.colormodel.upper(),list(options.left))
|
||||
rightColor = damask.Color(options.colormodel.upper(),list(options.right))
|
||||
myColormap = damask.Colormap(leftColor,rightColor)
|
||||
myColormap = damask.Colormap(leftColor,rightColor,predefined = options.predefined)
|
||||
|
||||
for file in files:
|
||||
outColormap = myColormap.export(file['name'],file['outtype'],options.steps,list(options.trim))
|
||||
|
|
Loading…
Reference in New Issue