# Choose a field field = 'ADMBASE::alp' # Do you want the log of the field? use_log = False dd = ds.all_data() mi, ma = dd.quantities.extrema(field) if use_log: mi,ma = np.log10(mi), np.log10(ma) # Instantiate the ColorTransferfunction. tf = yt.ColorTransferFunction((mi, ma)) # Set up the camera parameters: center, looking direction, width, resolution c = (ds.domain_right_edge + ds.domain_left_edge)/2.0 L = np.array([1.0, 1.0, 1.0]) W = ds.quan(240, 'code_length') N = 256 print mi,ma cam = ds.camera(c, L, W, N, tf, fields = [field], log_fields = [use_log]) im = cam.snapshot() cam.draw_grids(im) cam.show() --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in () 4 #tf.add_layers(10, 0.01, colormap = 'RdBu_r') 5 ----> 6 cam = ds.camera(c, L, W, N, tf, fields = [field], log_fields = [use_log]) 7 im = cam.snapshot() 8 cam.draw_grids(im) AttributeError: 'SimulationIODataset' object has no attribute 'camera'