Set metadata in FITS headers.
438024
def set_base_headers(self, hdr):
        """"""
        hdr = super(JoinDitheredImagesRecipe, self).set_base_headers(hdr)
        hdr['IMGOBBL'] = 0
        hdr['OBSMODE'] = 'DITHERED_IMAGE'
        return hdr
834986
protected function setImageMetadata()
    {
        $image = ImageFacade::make(
            $this->getFilePath()
        );

        $this->setMetadata('width', $image->width());
        $this->setMetadata('height', $image->height());
    }
826780
public static void initializeMetadata()
    {
        // TODO: merge inside meta API.
        DbConn cnx = null;
        try
        {
            cnx = Helpers.getNewDbSession();
            Helpers.updateConfiguration(cnx);
            cnx.commit();
        }
        catch (Exception e)
        {
            throw new JqmRuntimeException("Could not set metadata", e);
        }
        finally
        {
            Helpers.closeQuietly(cnx);
        }
    }
74768
def set_meta(self, total_length, object_name):
        
        self.total_length = total_length
        self.object_name = object_name
        self.prefix = self.object_name + ': ' if self.object_name else ''
897725
def set_metadata_for_node(self, node, metadata):
        
        return self.manager.set_metadata(self, metadata, node=node)
1168088
def save_fits(self, data, name):
        
        data = data.reshape(1, 1, data.shape[0], data.shape[0])
        new_file = pyfits.PrimaryHDU(data,self.img_hdu_list[0].header)
        new_file.writeto("{}".format(name), overwrite=True)
831566
def set_metadata(self, metadata: MetaData) -> None:
        
        self._parent.set_metadata(metadata)
        self._child.set_metadata(metadata)
515049
def _init_metadata(self, **kwargs):
        """"""
        osid_objects.OsidObjectForm._init_metadata(self, **kwargs)
        self._url_default = self._mdata['url']['default_string_values'][0]
        self._data_default = self._mdata['data']['default_object_values'][0]
        self._accessibility_type_default = self._mdata['accessibility_type']['default_type_values'][0]
623931
def metadata(self):
        """"""
        auto = {u'records': self.size}
        auto.update(self.meta)
        return auto
1031341
def set_header(self, name, value):
        '''  '''
        self._headers[_hkey(name)] = [str(value)]
729691
public Object setMetadata(String key, Object value) {
        return metadata.put(key, value);
    }
1241297
private void fillMetaData() {
        metaDataBuffer.putInt(MONITOR_VERSION_OFFSET, MONITOR_VERSION);
        metaDataBuffer.putInt(GW_DATA_REFERENCE_OFFSET, GW_DATA_OFFSET);
        metaDataBuffer.putInt(SERVICE_DATA_REFERENCE_OFFSET, serviceDataOffset);
        metaDataBuffer.putStringUtf8(GW_ID_OFFSET, gatewayId, ByteOrder.nativeOrder());
        metaDataBuffer.putInt(gwCountersLblBuffersReferenceOffset, 0);
        metaDataBuffer.putInt(gwCountersLblBuffersLengthOffset, GATEWAY_COUNTER_LABELS_BUFFER_LENGTH);
        metaDataBuffer.putInt(gwCountersValueBuffersReferenceOffset, 0);
        metaDataBuffer.putInt(gwCountersValueBuffersLengthOffset, GATEWAY_COUNTER_VALUES_BUFFER_LENGTH);
        metaDataBuffer.putInt(noOfServicesOffset, 0);
    }
648025
def _add_metadata_as_attrs(data, units, description, dtype_out_vert):
    """"""
    if isinstance(data, xr.DataArray):
        return _add_metadata_as_attrs_da(data, units, description,
                                         dtype_out_vert)
    else:
        for name, arr in data.data_vars.items():
            _add_metadata_as_attrs_da(arr, units, description,
                                      dtype_out_vert)
        return data
780218
def setMetadata(doc, m):
    """"""
    if doc.isClosed or doc.isEncrypted:
        raise ValueError("operation on closed or encrypted document")
    if type(m) is not dict:
        raise ValueError("arg2 must be a dictionary")
    for k in m.keys():
        if not k in ("author", "producer", "creator", "title", "format",
                     "encryption", "creationDate", "modDate", "subject",
                     "keywords"):
            raise ValueError("invalid dictionary key: " + k)
    d = "<</Author"
    d += getPDFstr(m.get("author", "none"))
    d += "/CreationDate"
    d += getPDFstr(m.get("creationDate", "none"))
    d += "/Creator"
    d += getPDFstr(m.get("creator", "none"))
    d += "/Keywords"
    d += getPDFstr(m.get("keywords", "none"))
    d += "/ModDate"
    d += getPDFstr(m.get("modDate", "none"))
    d += "/Producer"
    d += getPDFstr(m.get("producer", "none"))
    d += "/Subject"
    d += getPDFstr(m.get("subject", "none"))
    d += "/Title"
    d += getPDFstr(m.get("title", "none"))
    d += ">>"
    doc._setMetadata(d)
    doc.initData()
    return
484199
def _get_metadata(self):
        """"""
        self.metadata = self.fetch_header()
        self.variables = {g.name for g in self.metadata.grids}
1081572
def set_header(self, name, value):
        
        self._headers[_hkey(name)] = [_hval(value)]
44995
public function setMeta($meta)
    {
        foreach($meta as $name => $content)
            $this->getResponse()->getTheme()->addMeta($name, $content);
    }