text:
## 1.  Roles of format specification in variant tools:

Variant tools can import and export text files (or gzipped text files) in delimiter-separated format, namely records that are separated into columns by delimiters such as tab, space or comma. The file format must be variant-oriented (storing one or more variants by line), with the exception of sample-based PLINK format which is preprocessed internally into variant-oriented form for import. We use terms

• column for columns (text) in a delimiter-separated file, and
• field for fields (with types) in tables in a database, with
• variant fields for fields that define variants (chr, pos, ref, alt),
• variant info for fields that annotate variants (e.g. membership to dbSNP),
• genotype fields for fields to store genotypes of samples, and
• genotype info for fields that annotate genotypes (e.g. quality score of each genotype)

A format specification defines how to extract fields from columns and how to write columns from fields, to

• Insert new variants to the project using command vtools import. The text file should provide at least four fields for chromosome, position, reference and alternative alleles. In addition to variant and variant info, an input file can contain genotype and genotype info for one or more samples.

The four fields could, but not necessarily have to, be in four columns because a field could be synthesized from multiple columns, even not from any existing column. For example, if all variants are from dbSNP, ref and alt fields could be looked up from a dbSNP annotation database.

• Update existing variants with additional info using command vtools update. The text files can have
• full variant information (chr, pos, ref and alt) to update matching variants and related genotypes and their info, or
• chromosomal positions (chr and pos) to update all variants at specified locations, or
• range (chr, start, end) to update variants in specified regions
• Export samples and their variants using command vtools export. The file format should be organized by variant (not by sample). Although each line of the output file usually present a variant (chr, pos, ref, alt), it can contain multiple variants at a locus (chr, pos, ref, mutliple alternative alleles), or only locus-specific information (chr, pos).

## 2.  The format specification file (.fmt file)

A .fmt file describes the format of an external file so that it can be handled by variant tools. An format specification file follows an extended .ini format with section and key/value pairs. Details of this format can be found at this link because it is parsed by a Python ConfigParser object. This file should have at least a [format description] section and a few field sections. A format specification could be used to import and export files but you can ignore import or export specifications if you are only interested in exporting or importing.

### 2.1  Section [format description]

This section should have keys

• description: a description of the format, with preferably a URL to the documentation of the format.
• encoding (optional): encoding of the input file. If you see errors such as "codec can't decode byte 0xe7 in position 21480", you should perhaps add encoding=ISO-8859-1 to your .fmt file.
• delimiter (optional): delimiter to define columns in the input file. Default to tab (delimiter='\t'). If your input can be either tab or space delimited, use delimiter=None if your input does not have any missing field because '\t\t' or ' ' will be treated as a single delimiter. Quotations around other delimiters can be ignored (e.g. , instead of ',').
• header (optional): variant tools by default treats lines with a leading # as header and skip them during data importing. The header will also be used to probe sample names for some formats (e.g. .vcf). If your input file does not use such a header, you can override this behavior by specifying the number of lines to skip (header=1), or a pattern by which headers are matched (e.g. use header=^%.* for header lines starting with %, see documents of the Python re package for details).
• preprocessor (optional): a functor to pre-process input data into some intermediate format that can be readily imported by variant tools (e.g., PlinkConverter())
• export_by (optional, for export only): How variants at the same locus are exported. By default, variant tools exports one line for each variant. If fields specified by export_by (e.g. chr, pos) cannot uniquely identify variants so multiple variants will be outputted in one line, values at extra records will be ignored, or be collapsed to the first record if supported by column specification.
• sort_output_by (optional, for export only): How variants are ordered. This option is ignored if export_by is defined.
• One of
• variant: fields for chr, pos, ref, and alt. Such input files have complete variant information and can be used to add new variants or add or update info of existing variants.
• position: fields for chr and pos for chromosomal positions.
• range: fields for chr, start and end positions of regions.
input files of the latter two types can only be used to update matching variants with additional variant_info.
• variant_info (optional): Additional fields that will be inserted to specified variant table.
• genotype (optional): name of a field that will be imported into the sample variant table. Using a slice-index syntax, this field can process genotypes for multiple samples (e.g. index=8: will produce genotypes from columns 8, 9, ...). The return value of this field must be value 1 for heterozygote, 2 for homozygote, and -1 for double heterozygote (alt1, alt2).
• genotype_info (optional): Fields such as quality score that will be appended to genotype of each sample. They should either generate a single value for all samples (regular index), or a different value for each sample (slice-index).

General speaking, genotype info fields are sample specific so different samples can have different values for the same variant. Variant info fields are supposed to be properties of variants and are shared by all (or part of the) samples. It is up to the user (and file format) to decide how to handle particular fields from input files.

### 2.2  Section [DEFAULT] (define parameters of a format)

The default section defines values that exist, conceptually, in all sections. It is used to define parameters used for import or export. These parameters could be overriden using corresponding command line option. For example, in the following .fmt file (partial)

[format description]
description=Output from ANNOVAR, generated from command "path/to/annovar/annotate_variation.pl annovar.txt path/to/annovar/humandb/". This format imports chr, pos, ref, alt and ANNOVAR annotations. For details please refer to http://www.openbioinformatics.org/annovar/annovar_gene.html
variant=chr, pos, ref, alt
variant_info=%(var_info)s

[DEFAULT]
var_info=mut_type
var_info_comment=Fields to be outputted, can be one or both of mut_type and function

The key var_info has a help message defined by parameter var_info_comment, and a default value mut_type. If you query the details of this format using command

% vtools show format ANNOVAR_output

you will see at the end of the output the following description:

Other fields (usable through parameters):
function     the gene name, the transcript identifier and the sequence change in
the corresponding transcript

Format parameters:
var_info     Fields to be outputted, can be one or both of mut_type and function.
(default: mut_type)

This means you can pass an alternative value of var_info to this format using parameters such as --var_info function to change the variant information field to be imported or updated. For example, you can use command

% vtools update variant input_file --format ANNOVAR_output --var_info mut_type function

to update two fields mut_type and function instead of the default one (mut_type).

Name of a variable cannot be any keyword (e.g. field, comment, adj, type) or start with fmt_.

### 2.3  Field sections (import: how to extract fields from input file)

Import fields sections describe the fields that can be imported if they appear in one of variant, position, range, variant_info, genotype and genotype_info. Because the value of these fields could be overridden using corresponding parameters of command vtools import, a .fmt file might define additional or alternative fields to provide alternative ways to import data in this format.

Each field section can have the following keys:

• index: index(es) of field, which can be
• A 1-based index of the column in the input file. The value at this column will be used for this field.
• A tuple syntax with multiple indexes separated by ',', for example 5,7. A list of values at specified columns will be passed to an adjust function to produce values of the field.
• A 'slice' syntax to specify multiple fields. This syntax will only be used for genotype and genotype information fields. For example, index=8: will produce multiple fields from columns 8, 9, ... till end of the columns. Other examples include index=8::2 for 8, 10, 12, ..., index=5,8: for (5,8), (5,9), ..., and index=8::2,9::2 for (8,9), (10,11), etc
• type: can be any SQL allowed types such as "INTEGER", "FLOAT", "INTEGER NOT NULL", or "DECIMAL(7,6) NOT NULL"
• comment (optional) a description of the field
• adj (optional): Functions or functors to extract or modify one or more values from the field value. variant tools provides a number of functors to help the processing of different fields. For example,
• IncreaseBy(inc=1) (increase value by inc). This is usually used to adjust 0-based position to 1-based position that is used by variant tools.
• MapValue(map) (map value to another). This function is used to map input value to another one, for example, MapValue({'het': '1', 'hom': '2'}) maps value 'het' to '1' and 'hom' to '2'. Note that the mapped values should be strings or None.
• Nullify(val) (treat value as NULL). This is usually used to adjust input NA values to NULL in the database.
• RemoveLeading(val) (remove leading characters). This is usually used to remove leading chr from inputs with chromosomes such as chr1, chr2, because variant tools only stores 1, 2, etc.
• ExtractField(index, sep=';', default=None) (field of a column): Split the item by sep and return the index-th field (1-based). Return default if there are less than index fields. For example, ExtractField(2, ':') extracts 20 from 10:20:30.
• Multiple functors/functions can be used sequentially. For example, ExtractValue('CEU:'), ExtractField(1, '/') extracts value 12 from YRI:20/222;CEU:12/45 (the first extractor gets 12/45, the second extractor gets 12), and ExtractValue('CEU:'), SplitField('/') extracts values 12 and 45 from YRI:20/222;CEU:12/45.
• If none of the provided extractors can be used, you can define your own function. For example, lambda x: x[6:].replace(",", "") extracts 24000 from COUNT=24,000. You can also mix function with variant tools provided extractor ExtractValue("COUNT="), lambda x: x.replace(",", "")]) to extract 24000 from values such as ASD;COUNT=24,000;MAF=0.5.
• If the return value of at least one of the fields is a tuple of more than one values (e.g. result from functor SplitField), multiple records will be generated from this line. Non-tuple values of other fields will be copied automatically. For example, if three fields have values A1, (B1,), (C1, C2), they will produce two records of A1, B1, C1 and A1, None, C2.
• If you would like to exclude certain records, you can use adj to produce invalid records that will be excluded during importing. For example, a record with None alternative allele, or a field with NOT NULL type will be ignored, or a genotype with None mutation type will be ignored.

### 2.4  Section [Field formatter] (export: how to format fields for output)

This section specifies how to format fields when they are outputted to a file. Fields that are not listed in this section will be converted to string directly, unless a special wildcast formatter fmt_* is specified. This section should look like

[Field formatter]
fmt_chr=Prepend('chr')
fmt_freq=Formatter('{.3f}')
fmt_id=ValueOfNull('.')
fmt_other=lambda x: something

The name of the formatter should be field name prepended by fmt_. Formatter for each field should be a functor or a function. Their return value must be a string. More interestingly, multiple fields could be formatted altogether so it is possible to specify

fmt_PL1,fmt_PL2,fmt_PL3=lambda x: x[0] + x[1] + x[2]

to create a single string from multiple fields.

### 2.5  Column sections (export: how to organize fields into columns of output file)

Export reverses the import process. Instead of extracting fields from one or more columns, it generates columns from one or more fields. Column sections have title col_# where # is the index of column. They are specified in a similar way to fields. File formats without column specification cannot be used to export variants and samples.

Each column section can have the following keys:

• field: name of field or fields that will be used to create a column. The fields are usually defined in this .fmt file. If a field specifies genotype or genotype information of more than one sample using a slice syntax, multiple columns will be generated. If multiple records are collapsed into a single record(c.f. export_by), a tuple of values will be passed to the adj function/functor if it is defined. Otherwise, only the first record will be exported.
• adj: function or functor that accepts values at one or more fields and produce a single value at this column.
• comment (optional) a description of the column

The basic steps of outputting a file is to collect values of all fields, apply formatters to each field (or groups of fields) if available, and collect results to columns. Note that

• Although fields of columns are usually the ones that are defined in a .fmt file, arbitrary fields could be outputted if fields of a column are configurable through parameters.
• A column is considered as a genotype column if it contains field GT. Multiple columns will be exported if genotypes of multiple samples are outputted.
• A field can generate multiple columns by using a formatter that returns, for example, '1,2' for a comma-separated format.

## 3.  Import and test

After a file is created, you can use command

vtools import --format /path/to/fmt_file input_file --build specified_build

to import your file, and use command

vtools show table variant -l -1

to check if variants are correctly imported. If you believe that your format is commonly used, please send the .fmt file to our mailinglist. We will post the file to the repository so that others can make use of it.

## 4.  Examples

You can learn from the system format files on how to define a format:

You can have a look at system format files using

vtools show formats
vtools show format SOME_FORMAT
more cache/SOME_FORMAT.fmt

The first command gets a list of supported formats. The second command gets details of a specific format, and the third command lets you view the format file because all used formats are stored in a temporary directory named cache under your project folder.

## 5.  Import/Export adjustment functors

The following are all the adjustment functions that are provided by variant tools. The export functors are of course only used for exporting variants using .fmt files, and are not used in .ann files.

### 5.1  Adjust input

• IncreaseBy(inc=1), converting 5 -> 6
Increase input integer value by inc. This is usually used to adjust 0-based position to 1-based position that is used by variant tools.
• MapValue(map)''', converting A/A -> 2
Map value to another. This function is used to map input value to another one, for example, MapValue({'het': '1', 'hom': '2'}) maps value 'het' to '1' and 'hom' to '2'. The mapped values should be strings or None. The item itself will be returned if it cannot be mapped.
• Nullify(val)''', converting NA -> None
Treat value as NULL'''. This is usually used to adjust input NA values to NULL in the database. Multiple NULL values are allowed (e.g. Nullify(['NA', '.'])).
• DiscardRecord(val, keepMatched=False), discard records with (or without) val at specified field
Discard the whole record if the file has val, or is one of val if val is a list at the specified column, or if val is evaluated to be True if val is a lambda function. If keepMatched is true, non-matching records will be discarded. For example, DiscardRecord(lambda x: x.startswith('NC_')) will discard all records with passed value starts with NC_.
• RemoveLeading(val), converting chr10 -> 10
Remove leading characters val. This is usually used to remove leading chr from inputs with chromosomes such as chr1, chr2, because variant tools only stores 1, 2, etc.

### 5.2  Encode genotype

Variant tools ignores phase of genotype and stores 1 for heterozygote (alt/ref), 2 for homozygote (alt/alt), and -1 for both variants (ref/alt1, ref/alt2) for genotype alt1/alt2.
• EncodeGenotype(default=None), converting 1/1 -> 2
Convert genotype formats such as 0/1, 0|1 etc in vcf format to mutation type.
• VcfGenotype(default=None), converting A/A;50 -> 2
Extract genotype as the first item of a field and return mutation type. This is a shortcut to ExtractField(1, ';'), EncodeGenotype(default=None). For a .vcf file with multiple genotype columns, the index should be specified as index=10:.
• VcfGenoFromFormat(default=None), converting GT;DP, A/A;50 -> 2
Extract genotype field according to format specification and return mutation type. This is a shortcut to FieldFromFormat('GT', ';'), EncodeGenotype(default=None). There should be two inputting columns, the first for FORMAT, the second for value. Fields defined by this functor is used to extract genotype from a .vcf file that does not put genotype as the first field.

This field requires two input columns, the first one for format, and the second one for genotype field. For a typical .vcf file with multiple samples, this field should have index=9,10: in order to get format string from column 9, and values from columns 10, 11, ....

### 5.3  Extract values from a field

• ExtractFlag(name, sep=';'), converting SD:SF1:NS=1 -> 1
Split the value by sep, return 1 if it contains name and 0 otherwise.
• ExtractField(index, sep=';', default=None), converting 10;20:30 -> 20
Split the value by sep and return the index-th field (1-based). Return default if there are less than index fields. For example, ExtractField(2, ':') extracts 20 from 10:20:30.
• ExtractValue(name, sep=';', default=None), converting AS;MAF=0.4;dbSNP -> 0.4
Split the value by sep, return the rest of an item if it starts with name. For example, functor ExtractValue('MAF=') extracts 0.4 from AS;MAF=0.4;dbSNP.
• FieldFromFormat(name, sep=';', default=None), converting GT;DP, A/A;50 -> 50
Get the format from the first column and extract the corresponding field from the second column. This is used to extract genotype info according to FORMAT column of a vcf file. There should be two input columns, the first for FORMAT, the second for value.

This field requires two input columns, the first one for format, and the second one for genotype field. For a typical .vcf file with multiple samples, this field should have index=9,10: in order to get format from column 9, and values from columns 10, 11, ....

### 5.4  Produce multiple records

• SplitField(sep=','), converting 0.4,0.6 -> (0.4, 0.6)
This functor split value at a column to a tuple of multiple items, which will lead to multiple records if there are more than one items.
• CheckSplit(sep=','), converting A->A, A,T->(A, T)
This functor returns a tuple if there are multiple fields (the same as SplitField), and the item itself if it contains only one field (different from SplitField). This functor is used when you would like to copy an value to multiple records if there is a single item, and spread the items to multiple records if there are more than one item.

### 5.5  Retrieve information from annotation database.

• FieldFromDB(dbfile, res_field, cond_fields, default=None), obtaining reference allele from chromosome and position.
This functor accepts an annotation database, and returns value of a field by querying the database with inputted values. For example FieldFromDB("dbSNP.DB", "refNCBI", "chr,start") with index=1,2 will feed the functor with chromosome and start position from columns 1 and 2 of the input file. The querier will run a query similar to SELECT refNCBI FROM dbSNP WHERE chr=? AND start=? for each input value of chromosome and position, and use the result as the value of this field. A default value will be returned if no record is found, which will most likely invalidate the whole record (because of no reference allele in this case).

### 5.6  Connecting multiple functors and lambda functions

• func1, func2, converting AS=2/3;BD=5 to 3
When multiple functors (or lambda functions) are provided, the output of the first functor will be sent to the second, and so on. If a tuple is returned by one of the functors, the following functors will be applied to items in the tuple one by one. For example, SplitField(','), IncreaseBy(1) will convert 2,3,4 to (2, 3, 4), and then (3, 4, 5). Output values of other types (including list) are passed directly to the next functor/function, although there is no guarantee that the latter functor/function can handle such an input value.

### 5.7  Adjust output

• JoinFields(sep=','), converting field1 field2 -> field1,field2
This functor joins multiple items in different fields into one field. The items are separated by specified delimiter.
• IfMulti(ifFunc=None, elseFunc=None)
• ValueOfNull(val), converting NULL->val
Treat NULL values as specified value. This is usually used to adjust output NULL values to some symbols that the file format conventionally use. For example ValueOfNull('PASS') is applied to output filters for qualified variants, and ValueOfNull('.') for missing genotypes.
• Constant(val=CONSTANT_VAL), converting field_val->CONSTANT_VAL
Set a constant value to a field.
• SequentialCollector([..extractors..])
Define an extractor that calls a list of extractors. The string extracted from the first extractor will be passed to the second, and so on.
• CSVFormatter()
Format any input as a field in a csv file. It will quote strings with ", , or newline. In the first case, it will also replace all instances of " to "".
• InfoFormatter(name, ignore='')
Output value val in the format of name=val. Nothing will be outputted if item matches ignore.
• FlagFormatter(name)
Output name if value is True, and '' otherwise.
• GenoFormatter(style='genotype', **kwargs)
This formatter determines how genotypes are outputted.
• style='genotype': Output actual genotype. This style accepts paramters sep and null to specify how to join two genotypes, and what to use for null genotype for indels. For example, if ref=A, alt=T, sep=',' (default is tab), this formatter returns A,A, A,T, T,T, and T,- for homozygous reference alleles, heterozygote, homozygous alternative alleles, and one of double alternative alleles, respectively. Missing data are represented by '.'.
• style='numeric': Output number of alternative alleles. This style accepts parameter base=0 and outputs 0, 1, 2 (if base=0 for homozygous reference alleles, heterozygote, homozygous alternative alleles. Genotypes with two different alternative alleles are also outputted as 2. Missing data are represented by 'NA'.
• style='vcf': output genotype in vcf format. For example 0/0 for homozygous reference alleles, 1/1 for homozygous alternative alleles, and 1/2 for two different alternative alleles. Missing data are represented by '.'.
• style='plink': The same as style genotype but treat half-missing genotype (./A) as missing, and ignore all multi-allele variants. Missing data are represented by '0'.


text:
Sysdig Platform supports disabling password-based authentication on both SaaS and on-prem deployments. As an administrator (super administrator for on-prem), you can use an API to achieve it. This configuration is applicable to those who use single sign-on.

## SaaS Deployments

As an administrator, perform the following:

1. Get the Sysdig Platform settings:

See SaaS Regions and IP Ranges and identify the correct domain URL associated with your Sysdig application and region. For example, for Sysdig Monitor on US East is:

GET https://app.sysdigcloud.com/api/auth/settings/

For other regions, the format is https://<region>.app.sysdig.com/api/auth/settings. Replace <region> with the region where your Sysidig application is hosted. For example, for Sysdig Monitor in the EU, you use https://eu1.app.sysdig.com/api/auth/settings.

2. Find the ID of the active SSO setup:

GET https://app.sysdigcloud.com/api/auth/settings/active
3. Retrieve the specific settings associated with the SSO setup:

GET https://app.sysdigcloud.com/api/auth/settings/{id}

The setting is displayed in a JSON file.

4. In the JSON file, change the following from false to true:

settings/forbidPasswordLogin: True
5. Update the setting with a request to the same URL with the same JSON, with the changed parameter. URL depends on the type of deployment.

PUT https://app.sysdigcloud.com/api/auth/settings/{id}

## On-Prem Deployments

As a super administrator, perform the following:

1. Get the Sysdig Platform settings:

GET https://<URL-installation>/api/admin/auth/settings

Replace <URL-installation> with the URL of your on-prem deployment.

2. Retrieve the specific settings associated with the SSO setup. In a typical scenario, only one IDP exists per deployment.

GET https://<URL-installation>/api/auth/settings/{id}

The setting is displayed in a JSON file.

3. In the JSON file, change the following from false to true:

settings/forbidPasswordLogin: True
4. Update the setting with a request to the same URL with the same JSON, with the changed parameter. URL depends on the type of deployment.

PUT https://app.sysdigcloud.com/api/admin/auth/settings/{id}

## Migrating from the ConfigMap Method

Previously, the sysdigcloud.restrict.password.login parameter in the Kubernetes ConfigMap has been used to disable password authentication. After installing 3.2.0, deployments utilizing the sysdigcloud.restrict.password.login settings will be automatically migrated to use the new settings.

format: plain


text:
BACK

# NEW CATALYSTS FOR THE SYNTHESIS OF ORGANIC COMPOUNDS

The production of chemical compounds from simpler organic molecules is of great importance for various industrial processes. It is based on the bonding between carbons of the precursor organic compounds, aided by catalysts (typically transition metals). These reactions make it possible to obtain natural and synthetic substances for the development of new materials, such as polymers and pharmaceuticals.

In particular, the so-called carbon-carbon (CC) cross-coupling reactions, in which two different precursor molecules are bound to form the final chemical compound, are of such importance that their development granted the 2010 Nobel Prize in chemistry to researchers Richard F. Heck, Ei-ichi Negishi and Akira Suzuki.

# Oxygen and the Degradation of Black Phosphorus

Semiconductors are a class of materials essential for the electronics industry. They have intermediate properties between conductors and insulators, which can be modified by doping with different chemical elements or by the application of electric fields or light.

Black phosphorus is a stable form of phosphorus whose crystalline structure is composed by stacking two-dimensional, one atom thick, thin layers. This material has immense potential to be used in electronic devices at the nanoscale due to its semiconductor properties, which can be adjusted by the number of atomic layers according to the need.

# New Catalysts for Hydrogen Production

The hydrogen gas ($\rm H_2$) is one of the best alternatives to fossil fuels because its combustion has as final product only water vapor. However, several technological challenges still need to be overcome in order to make it economically viable.

One way to produce hydrogen is by breaking down water molecules $\rm H_2O$, with formation of $\rm H_2$ molecules. The main reaction in this process is the Hydrogen Evolution Reaction (HER) in which the protons in an acid medium are reduced and form hydrogen gas by electrons passed through catalysts.

# Improving the Treatment of Industrial Waste

Synthetic dyes are in constant use in a wide variety of industries, from textile to cosmetics. Both the production and use of these substances can lead to environmental problems if they are not properly degraded or removed from industrial effluents. Among the many physical, chemical or biological processes that can be used for the treatment of such wastes, the adsorption processes are noteworthy for combining low cost and high removal rates.

# Call for proposals for the LNLS beamlines

Submission period: September 1st to 30th, 2017.Beamtime: First Semester, 2018.Research proposals are submitted through the SAU Online portal.

# Improving Hydrogen Storage

The search for clean, renewable and cheap energy sources has intensified in recent years with the growing consensus that the rise in the planet's average temperature, and the consequent intensification of extreme weather events, is caused by human action.

Hydrogen ($\rm H_2$) is one of the best alternatives to fossil fuels, especially because its combustion has only water vapor as final product. However, the economic viability of the production, storage and distribution of hydrogen for power generation still requires solutions for several technological challenges.

# Applications open for the 6th SAXS School

The 6th SAXS School will be held from October 17th to 20th, 2017, in the Brazilian Synchrotron Light Laboratory and is intended to post-graduate students and early career scientists interested in the learning of Small-Angle X-ray Scattering (SAXS).The main objective of the School is to provide an opportunity for young scientists who develop their research in areas related to Biology, Physical Sciences, Materials Science and Chemistry, to have a contact with SAXS technique, acquiring both theoretical and experimental skills.The courses will offer an overview of SAXS theory, data reduction and analysis tools, as well as modelling techniques. It will include tutorials and hands-on experiments at the LNLS' SAXS facilities.Applications will be received until September 11th, 2017, through the website.

# Increasing Lactase stability for industrial applications

Lactose is the main carbohydrate present in milk. To be digested and absorbed by the body, it must be broken down into its constituents: glucose and galactose. The breakdown is catalyzed by an enzyme called lactase, produced in the small intestine of young mammals especially for the digestion of the maternal milk.

The production of this enzyme decreases with time, making the body progressively incapable of digesting lactose. Thus, despite the social habit of consuming milk from other animals and dairy products after childhood, around 65% of the world population has some degree of lactose intolerance.

# Electronic Effects on the Oxidation of Ethanol

In internal combustion engines, various toxic substances - such as $\rm CO$, $\rm NO_2$ - are produced due to the incomplete breakdown of fuels. By decreasing the activation energy required for complete combustion to occur, catalysts aid in transforming these products into less toxic gases - such as carbon dioxide ($\rm CO_2$), methane ($\rm CH_4$).

Nevertheless, $\rm CO_2$ and $\rm CH_4$ produced mainly by human activity are currently considered to be responsible for the rise in the average temperature of the planet, which leads to the intensification of extreme climatic events. Hence, the search for more efficient energy sources that can significantly reduce or even eliminate the emission of these gases has intensified.


text:
NULL
Section
All sections
Countries | Regions
Countries | Regions
Article Types
Article Types
Year
Volume
Issue
Pages
IMR Press / RCM / Volume 22 / Issue 1 / DOI: 10.31083/j.rcm.2021.01.267
Open Access Case Report
Case report of amiodarone-associated allergic pneumonitis amidst the COVID-19 pandemic
Show Less
1 Department of Cardiology, Epworth Healthcare, Melbourne, 3121 Victoria, Australia
2 Department of Respiratory Medicine, Epworth Healthcare, Melbourne, 3121 Victoria, Australia
Rev. Cardiovasc. Med. 2021 , 22(1), 181–184; https://doi.org/10.31083/j.rcm.2021.01.267
Submitted: 29 November 2020 | Revised: 28 December 2020 | Accepted: 29 December 2020 | Published: 30 March 2021
Abstract

Amiodarone is a common antiarrhythmic drug that is utilised in clinical practice and is associated with pulmonary toxicity. The most common form of pulmonary complication is interstitial pneumonitis which is treated with discontinuation of amiodarone and initiation of corticosteroids. Amiodarone-induced pulmonary eosinophilia is a rare complication of amiodarone therapy, with blood and pulmonary eosinophilia the predominant features. During the COVID-19 era, the incidence of delay in treatment of pulmonary pathology is also delayed due to the effort of excluding COVID-19 infection. Here we report a case of a 64-year-old man who developed eosinophilic pneumonia after initiation of amiodarone therapy, and the investigations required to exclude other forms of pulmonary toxicity. We also reviewed the effect of COVID-19 testing in the management of patients presenting with respiratory distress.

Keywords
Amiodarone
Pulmonary eosinophilia
COVID-19
Amiodarone-induced pulmonary toxicity
Corticosteroids
1. Introduction

Amiodarone is the most commonly used antiarrhythmic drug to treat or prevent recurrences of supraventricular and ventricular arrhythmias [1]. Amiodarone is associated with adverse effect that can affect multiple organs, including pulmonary toxicity. There are multiple manifestations of amiodarone-induced pulmonary toxicity ranging from interstitial pneumonitis (most common) to acute respiratory distress syndrome, and amiodarone-induced eosinophilic pneumonitis is a rare complication of pulmonary toxicity [2].

Furthermore, the incidence of misdiagnosis or late institution of treatment has increased during the era of COVID-19. Here we describe a case of amiodarone-induced eosinophilic pneumonitis that present as sub-acute respiratory failure and the effect of COVID-19 testing in delaying diagnosis and management.

2. Case report

A 64-year-old man was admitted to hospital in August 2020 for an elective mitral valve replacement secondary to symptomatic functional mitral valve regurgitation. His past medical history includes a previous mechanical aortic valve replacement secondary to a bicuspid aortic valve stenosis and hypertension. A pre-surgery coronary angiography revealed no coronary artery disease and COVID-19 PCR nasopharyngeal swab was negative. During his third day post-operation, he developed an episode of atrial fibrillation with rapid ventricular rate in intensive care unit. Intravenous amiodarone of 1200 mg in 24 hours was initiated and later changed to oral amiodarone 200 mg three times a day after the patient converted to sinus rhythm.

On day 15 of his inpatient stay, he developed worsening shortness of breath, productive cough and worsening hypoxia. On examination, he was hypoxic with an oxygen saturation of 89% on room air with bilateral crackles up to the mid-zone of the lungs on auscultation and he was afebrile. His arterial blood gas results were as follows: pH - 7.48, p0${}^{2}$ - 76 mmHg, pCO${}_{2}$ - 35 mmHg and bicarbonate - 23 mmol/L. Other laboratory findings were an elevated white cell count of 20 $\times$ 10${}^{9}$/L with an eosinophilia of 1.6 $\times$ 10${}^{9}$/L and a C-reactive protein level of 120 mg/L. His chest x-ray revealed confluent perihilar and bilateral lung base consolidation consistent with pulmonary oedema (Fig. 1a). Further investigations with transthoracic echocardiography confirmed a normal ejection fraction with good function of the mitral valve prosthesis. A high-resolution CT scan of the chest revealed extensive ground glass opacity in both lungs, sparing the apical region with areas of patchy consolidation (Fig. 2). Furosemide and piperacillin/tazobactam were started and he was transferred to the intensive care unit where he was subsequently intubated due to respiratory fatigue. A repeat COVID-19 PCR from a swab and sputum sample were negative. His bronchoalveolar lavage (BAL) revealed a white cell count of 350 $\mathrm{\mu}$L with 80% eosinophils. Bacterial and viral culture were negative.

Fig. 1.

(a) New onset of diffuse perihilar and lung infiltrates on initial chest x-ray, which was initially thought to represent pulmonary oedema figure 1. (b) Complete resolution of lung infiltrates on repeat chest x-ray on day 60 of admission. The patient was clinically better without any oxygen supplementation required.

Fig. 2.

High resolution CT chest 12 days after administration of amiodarone. Extensive bilateral ground glass opacity with areas of patchy consolidation are seen. The differential diagnosis of this chest imagine are acute pulmonary oedema, bilateral bacterial pneumoniae, viral pneumonitis and interstitial pneumonitis.

After a delay in the initiation of prednisolone, he was started on 1 g of methylprednisolone and amiodarone was stopped on day 20 of his inpatient stay. He had good response to treatment with normalisation of eosinophil count and was subsequently extubated after five days of treatment with methylprednisolone, which was then stopped. On day 30 of his inpatient stay, he developed another episode of type 1 respiratory failure with a chest x-ray showing bilateral infiltrates throughout both mid and lower zone and recurrence in eosinophilia count to 1.9 $\times$ 10${}^{9}$/L. COVID-19 PCR on both nasopharyngeal swab and sputum sample were negative. He was then started on 50 mg of prednisolone for 6 weeks and recovered with resolution of chest x-ray changes (Fig. 1b) and normalisation of eosinophil count. The patient was discharged back home and is now clinically stable off prednisolone and amiodarone.

3. Discussion

The incidence of amiodarone-induced pulmonary toxicity ranges between 5-13% [3]. The most common presentation is interstitial pneumonitis which commonly presents after treatment with amiodarone for an average period of 2 months. The symptoms of Amiodarone pulmonary toxicity range from dyspnoea, non-productive cough and fever. Chest imaging usually shows bilateral patchy interstitial or alveolar infiltrates [4] in amiodarone pulmonary toxicity. Mainstay of treatment are discontinuation of amiodarone and initiating corticosteroids [5].

Amiodarone-induced pulmonary eosinophilia is a rare manifestation of amiodarone-induced pulmonary toxicity. The presentation ranges from acute to chronic form, with the acute form typically presenting less than one month after the initiation of amiodarone. Patients typically present with fever, non-productive cough and dyspnoea [6]. Diagnostic criteria include $>$ 1 $\times$ 10${}^{9}$ eosinophils/L in peripheral blood, $\geq$ 25% eosinophils on BAL cell count, and/or demonstration of lung tissue eosinophilia on lung biopsy [7]. The diagnosis also requires careful review of the medication history and exclusion of other possible aetiologies, such as infections or toxins.

Amiodarone-induced eosinophilic pneumonitis is most frequently diagnosed using lung biopsy. A study by Larsen et al. diagnosed four cases of eosinophilic pneumonitis with pulmonary biopsy in a retrospective study of 75 patients with suspected amiodarone-induced pulmonary toxicity [8]. However, the diagnosis of amiodarone-induced pulmonary eosinophilia using peripheral or BAL eosinophilia are limited. Currently, only three case reports of amiodarone-induced eosinophilic pneumonitis diagnosed by peripheral eosinophilia has been published, with two of them demonstrating 20% and 80% eosinophils on BAL respectively [9-11].

Both blood and/or BAL eosinophilia have been detected in patients with other manifestation of amiodarone-induced pulmonary toxicity [6]. Coudert et al. studied the significance of BAL findings in fifteen patients with amiodarone pneumonitis. The study showed that the average eosinophilia percentage was 6% and the highest was 16%, but none fulfilled the criteria for a diagnosis of eosinophilic pneumonitis [8].

Question remains regarding the pathophysiology of amiodarone-induced pulmonary eosinophilia. Possible explanation includes direct cytotoxicity to type II pneumocytes, T-helper lymphocytes predominant inflammation and activation of the angiotensin enzyme system [8]. More research is needed to investigate the correlation between the effects of amiodarone on pneumocytes and activation of eosinophils.

Although a histopathology examination of a lung biopsy is an excellent way to confirm diagnosis, there is a strong temporal relationship between the initiation of amiodarone, distinctive radiological changes, blood eosinophilia, and presence of eosinophils on BAL. This is further confirmed by recurrence of symptoms, radiological changes, and blood eosinophilia with early cessation of corticosteroids. Therefore, there was no need for a lung biopsy to confirm diagnosed amiodarone pneumonitis.

Furthermore, the patient had repeated COVID-19 PCR testing due to the development of respiratory distress and bilateral ground glass opacity on radiology. This has caused delay in reaching the final diagnosis and institution of steroids.

There are other cases of delayed diagnosis of reversible life-threatening condition due to COVID-19 such as myocardial infarction [12] or Kawasaki disease [13]. In both cases, important investigations and timely administration of life-saving treatments were delayed. Before the COVID-19 era, these patients would likely have been referred immediately for further evaluation.

Strategies should be implemented to minimize diagnostic errors. This ranges from optimizing workflow, using people-focused interventions to implementing organizational strategies [14]. Open communication between clinicians should be encouraged and practicing ‘diagnostic huddles’ where cases are discussed to determine whether anything has been missed. Clear policies from the state and institution will assist in reducing diagnostic error [15]. Standardized metrics should be developed to monitor diagnostic performances and outcomes and evaluate how COVID-19 diagnostic error can be reduced [16]. The patient’s case was discussed at a multi-disciplinary team (MDT) meeting, which includes multiple specialties, after he was discharged. The meeting highlighted the need for a high index of suspicion of iatrogenic cause of respiratory failure during the COVID-19 pandemic and improved communication between specialties and the use of ‘diagnostic huddles’ to reduce the risk of diagnostic errors.

4. Conclusions

This case emphasizes on the importance of recognising eosinophilic pneumoniae as a form of amiodarone induced pulmonary toxicity and it should be suspected in patients presenting with respiratory symptoms and radiographic findings after exclusion of other aetiologies.

Author contributions

MA: Data collection, literature review, write up of manuscript; MMM: Contributed to interpretation of results and review of manuscript; RD: Contributed to interpretation of results and review of manuscript.

Ethics approval and consent to participate

This study was consented by the patient and approved by the Ethics Committee of the Epworth Healthcare, Melbourne, Australia.

Acknowledgment

There are no acknowledgments to disclose.

Funding

The author declares no conflicts of interest.

Conflict of interest

The author declares no conflicts of interest.

Publisher’s Note: IMR Press stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Share


text:
17Calculus Derivatives - Exponential Functions

17Calculus

Derivatives of Exponential Functions

On this page we discuss the derivatives of the exponential functions $$e^x$$ and $$a^x$$.   For the basic exponential derivatives you do not need the chain rule.   But we include discussion that requires the chain rule on this page.   However, each section is labeled.   So if you have not studied the chain rule yet, you can read the sections that apply to you and then come back here once you have studied it.

The Exponential Rule With Base $$e$$

Basic Exponential Rule

$$\displaystyle{ \frac{d}{dt}[e^t] = e^t }$$

Exponential With Chain Rule

$$\displaystyle{ \frac{d}{dt}[e^u] = e^u \frac{du}{dt} }$$

It looks like we didn't do anything here.   However, the exponential function is the only function whose derivative is itself.
Before we go on, let's watch a video that gives an intuitive explanation of the derivative of exponential functions and why $$f(x)=e^x$$ is special.

3Blue1Brown - Derivatives of exponentials [13min-49secs]

video by 3Blue1Brown

The Exponential Rule With The General Base $$a$$

Okay, so what do you do if you have a base other than $$e$$?   The formula is fairly straightforward but let's derive from our rules of logarithms.   Since we don't like to memorize formulas and we already know the logarithm rules, why not just derive it when we need it, since we don't use it very much?

So, let's convert $$y=a^x$$, where $$a$$ is a constant, into a form with $$e$$.
$$\begin{array}{rcl} y & = & a^x \\ \ln(y) & = & \ln(a^x) \\ & = & x\ln(a) \\ e^{\ln(y)} & = & e^{x\ln(a)} \\ y & = & e^{x\ln(a)} \end{array}$$

So now when we take the derivative of $$y = a^x$$, we can actually take the derivative of $$y=e^{x\ln(a)}$$.   Using the chain rule, we have $$(a^x)' = (\ln(a))e^{x\ln(a)}$$.   Notice how didn't have to memorize this formula.   We used the logarithm rules we already know.

Here is a video that goes through this explanation again.   It is always good to get explanations from different sources since it will help you understand the material better.

PatrickJMT - Derivatives of Exponential Functions [5min-49secs]

video by PatrickJMT

Here is an interesting video that shows how to get the equation for the derivative of $$f(x)=a^x$$ another way.   He shows that $$\displaystyle{f'(x)=\frac{d[a^x]}{dx}=a^x f'(0)}$$.   This is an interesting and unusual way to think about the derivative.

Dr Chris Tisdell - Derivative of exponentials [9min-15secs]

video by Dr Chris Tisdell

So far, we've only been looking at equations with exponential functions.   Here is a video discussing the graph, the derivative and the tangent line of three exponential functions.   This helps you get more of an intuitive feel for this function and it's derivative.

MathTV - Some Natural Exponential Functions and Tangent Lines [4min-11secs]

video by MathTV

Practice - Chain Rule Not Required

Unless otherwise instructed, calculate the derivative of these functions.

$$y = e^x(x+x\sqrt{x})$$

Problem Statement

Calculate the derivative of $$y = e^x(x+x\sqrt{x})$$

Solution

Krista King Math - 1069 video solution

video by Krista King Math

Log in to rate this practice problem and to see it's current rating.

$$f(x) = 4^x+3e^x+x^4$$

Problem Statement

Calculate the derivative of $$f(x) = 4^x+3e^x+x^4$$

Solution

PatrickJMT - 1074 video solution

video by PatrickJMT

Log in to rate this practice problem and to see it's current rating.

$$f(x) = e^x x^2$$

Problem Statement

Calculate the derivative of $$f(x) = e^x x^2$$

Solution

PatrickJMT - 1076 video solution

video by PatrickJMT

Log in to rate this practice problem and to see it's current rating.

Practice - Chain Rule Required

$$f(x) = (x^2-1)e^{-x}$$

Problem Statement

Calculate the derivative of $$f(x) = (x^2-1)e^{-x}$$

Solution

Krista King Math - 1066 video solution

video by Krista King Math

Log in to rate this practice problem and to see it's current rating.

$$\displaystyle{ f(x)=xe^{\sqrt{x}} }$$

Problem Statement

Calculate the derivative of $$\displaystyle{ f(x)=xe^{\sqrt{x}} }$$

Solution

Krista King Math - 1067 video solution

video by Krista King Math

Log in to rate this practice problem and to see it's current rating.

$$\displaystyle{ f(x) = \frac{1-e^{-x}}{x} }$$

Problem Statement

Calculate the derivative of $$\displaystyle{ f(x) = \frac{1-e^{-x}}{x} }$$

Solution

Krista King Math - 1068 video solution

video by Krista King Math

Log in to rate this practice problem and to see it's current rating.

$$\displaystyle{ 3e^{ x^2+7 } }$$

Problem Statement

Calculate the derivative of this function and give your final answer in completely factored form. $$\displaystyle{ 3e^{ x^2+7 } }$$

$$\displaystyle{ \frac{d}{dx} \left[ 3e^{ x^2+7 } \right] = 6xe^{x^2+7} }$$

Problem Statement

Calculate the derivative of this function and give your final answer in completely factored form. $$\displaystyle{ 3e^{ x^2+7 } }$$

Solution

 $$\displaystyle{ \frac{d}{dx} \left[ 3e^{ x^2+7 } \right] }$$ $$\displaystyle{ 3e^{x^2+7} \cdot \frac{d}{dx}[x^2+7] }$$ $$3e^{x^2+7} \cdot (2x)$$ $$6xe^{x^2+7}$$

Another way to work this is with the substitution method.

 let $$u=x^2+7$$ $$\displaystyle{ \frac{d}{dx} \left[ 3e^{ x^2+7 } \right] }$$ $$\displaystyle{ 3\frac{d[e^u]}{du} \cdot \frac{d[x^2+7]}{dx} }$$ $$3e^u \cdot (2x)$$ $$6xe^{x^2+7}$$

$$\displaystyle{ \frac{d}{dx} \left[ 3e^{ x^2+7 } \right] = 6xe^{x^2+7} }$$

Log in to rate this practice problem and to see it's current rating.

$$\displaystyle{ f(x) = e^{x\sin(2x)} }$$

Problem Statement

Calculate the derivative of $$\displaystyle{ f(x) = e^{x\sin(2x)} }$$

Solution

PatrickJMT - 1077 video solution

video by PatrickJMT

Log in to rate this practice problem and to see it's current rating.

$$\displaystyle{ g(x) = 2e^{\cos(x)\sin(5x)} }$$

Problem Statement

Calculate the derivative of $$\displaystyle{ g(x) = 2e^{\cos(x)\sin(5x)} }$$

Solution

PatrickJMT - 1075 video solution

video by PatrickJMT

Log in to rate this practice problem and to see it's current rating.

$$\displaystyle{f(t)=\cos\left(2^{\pi t}\right) }$$

Problem Statement

Calculate the derivative of $$\displaystyle{f(t)=\cos\left(2^{\pi t}\right) }$$

Solution

PatrickJMT - 1078 video solution

video by PatrickJMT

Log in to rate this practice problem and to see it's current rating.

For what values of $$x$$ does $$h(x)=5e^{5x}-25x$$ have negative derivatives?

Problem Statement

For what values of $$x$$ does $$h(x)=5e^{5x}-25x$$ have negative derivatives?

Solution

PatrickJMT - 1079 video solution

video by PatrickJMT

Log in to rate this practice problem and to see it's current rating.

$$\displaystyle{ y = \cos \left( \frac{1-e^{2x}}{1+e^{2x}} \right) }$$

Problem Statement

Calculate the derivative of this function and give your final answer in completely factored form. $$\displaystyle{ y = \cos \left( \frac{1-e^{2x}}{1+e^{2x}} \right) }$$

Solution

Krista King Math - 986 video solution

video by Krista King Math

Log in to rate this practice problem and to see it's current rating.

$$\dfrac{d}{dx}( 2^{x^2} )$$

Problem Statement

Evaluate $$\dfrac{d}{dx}( 2^{x^2} )$$ .

Hint

$$2 = e^{\ln2}$$

Problem Statement

Evaluate $$\dfrac{d}{dx}( 2^{x^2} )$$ .

$$\dfrac{d}{dx}( 2^{x^2} )$$ $$= 2^{x^2} 2x\ln2 = 2^{x^2+1}x\ln2$$

Problem Statement

Evaluate $$\dfrac{d}{dx}( 2^{x^2} )$$ .

Hint

$$2 = e^{\ln2}$$

Solution

Michel vanBiezen - 4379 video solution

video by Michel vanBiezen

$$\dfrac{d}{dx}( 2^{x^2} )$$ $$= 2^{x^2} 2x\ln2 = 2^{x^2+1}x\ln2$$

Log in to rate this practice problem and to see it's current rating.

When using the material on this site, check with your instructor to see what they require. Their requirements come first, so make sure your notation and work follow their specifications.

DISCLAIMER - 17Calculus owners and contributors are not responsible for how the material, videos, practice problems, exams, links or anything on this site are used or how they affect the grades or projects of any individual or organization. We have worked, to the best of our ability, to ensure accurate and correct information on each page and solutions to practice problems and exams. However, we do not guarantee 100% accuracy. It is each individual's responsibility to verify correctness and to determine what different instructors and organizations expect. How each person chooses to use the material on this site is up to that person as well as the responsibility for how it impacts grades, projects and understanding of calculus, math or any other subject. In short, use this site wisely by questioning and verifying everything. If you see something that is incorrect, contact us right away so that we can correct it.


text:
# Electronic – How to correctly use the formula for calculating the air-gap in a pulse transformer

resonant-convertertransformer

To achieve a certain value of the magnetizing inductance (Lm), we can adjust the transformer air gap.

Air gap calculation formula:

There is no particular information on this, but I assumed that:

u0 = Vacuum permeability (4π×10−7 H/m)
N - primary turns? (x18)
Ae effective area (PQ5050) = 328mm2 (Core datasheet)
Lm = magnetic inductance (my goal - 60uH)

Substituting these values into the formula, I got 2.2 meters of the gap, which is clearly incorrect.

(0.000001257 * 324(18^2) * 0.328) / 0.00006

Next, I tried replacing N with the transformation ratio (n = 1.5), I got 15.46mm of the gap. This is closer to true, but still a very large gap.

(0.000001257 * 2.25(1.5^2) * 0.328) / 0.00006

I also tried to remove the square from N, but this is still a very large gap.

Question: what is my mistake? I assumed that the matter is in N (it is not clear whether this is the number of turns of the primary winding, or this is the transformation ratio (but it is denoted by a small n))

Perhaps there are other formulas with which you can get the Air gap value, the desired value of the magnetizing inductance?

Perhaps there are other formulas with which you can get the Air gap value, the desired value of the magnetizing inductance?

Well, you have the ferrite core-set data sheet and you have the ferrite material spec; 3C95 so let's proceed from there. The important formulas to know are these: -

The effective permeability of a core set when gapped

$$\mu_e = \dfrac{\mu_i}{\mu_i\cdot\dfrac{\ell_g}{\ell_e}+1}$$

• Where $$\\mu_i\$$ is the ungapped magnetic relative permeability of 3C95 (2530)
• Where $$\\mu_e\$$ is the gapped magnetic relative permeability of 3C95 (trying to find this)
• Where $$\\ell_g\$$ is the length of the gap in metres (maybe 1mm or 0.001 metres)
• Where $$\\ell_e\$$ is the core magnetic length in metres (0.113 metres)

If you plug-in the numbers with a gap of 1 mm, $$\\mu_e\$$ equals 108.17 and this is used in the next formula for inductance: -

Inductance of the gapped core set

$$L = \dfrac{\mu_0\cdot\mu_e \cdot N^2 \cdot A_e}{\ell_e + \ell_g}$$

• Where $$\A_e\$$ is the effective cross sectional area in m² (328 mm² or 3.28 x $$\10^{-4}\$$ m²)
• Where $$\N\$$ is the number of turns (18)
• Where $$\\mu_0\$$ is $$\4\pi\times 10^{-7}\$$
• The formula assumes that gapping has increased the magnetic length of the core - should you in fact "grind" down the centre limb, the total effective length remains as $$\\ell_e\$$.

So, if you plug in the numbers now (1 mm gap) you get 126.7 μH

Given the above, I reckon you should be able to figure out the reverse process to get the inductance you require (about 2 mm).

Summary

You will also have to double check that you have provided enough of a gap so that the peak magnetic flux density remains significantly less than 400 mT. I usually aim for 200 mT but, in the Cree document that you linked, they appear to be aiming for 120 mT. This is fairly easy to check remembering that $$\B = \mu_0\cdot \mu_e\cdot H\$$ where $$\H\$$ is the peak current multiplied by number of turns and then divided by $$\\ell_e\$$.

Or, $$\H = \dfrac{MMF}{\ell_e}\$$


text:
# Mutual Information#

## Synopsis#

Global registration by maximizing the mutual information and using a translation only transform.

## Results#

Output:

Optimizer stop condition: GradientDescentOptimizer: Maximum number of iterations (200) exceeded.

Result =
Translation X = 12.9484
Translation Y = 17.0856
Iterations    = 200
Metric value  = 0.594482
Numb. Samples = 567

## Code#

### C++#

#include "itkImageRegistrationMethod.h"
#include "itkTranslationTransform.h"
#include "itkMutualInformationImageToImageMetric.h"
#include "itkNormalizeImageFilter.h"
#include "itkDiscreteGaussianImageFilter.h"
#include "itkResampleImageFilter.h"
#include "itkCastImageFilter.h"
#include "itkCheckerBoardImageFilter.h"
#include "itkEllipseSpatialObject.h"
#include "itkSpatialObjectToImageFilter.h"
#include "itkImageFileWriter.h"

constexpr unsigned int Dimension = 2;
using PixelType = unsigned char;

using ImageType = itk::Image<PixelType, Dimension>;

int
main(int argc, char * argv[])
{
if (argc < 4)
{
std::cout << "Usage: " << argv[0] << " imageFile1 imageFile2 outputFile" << std::endl;
return EXIT_FAILURE;
}

// We use floats internally
using InternalImageType = itk::Image<float, 2>;

// Normalize the images
using NormalizeFilterType = itk::NormalizeImageFilter<ImageType, InternalImageType>;

auto fixedNormalizer = NormalizeFilterType::New();
auto movingNormalizer = NormalizeFilterType::New();

fixedNormalizer->SetInput(fixedImage);
movingNormalizer->SetInput(movingImage);

// Smooth the normalized images
using GaussianFilterType = itk::DiscreteGaussianImageFilter<InternalImageType, InternalImageType>;

auto fixedSmoother = GaussianFilterType::New();
auto movingSmoother = GaussianFilterType::New();

fixedSmoother->SetVariance(2.0);
movingSmoother->SetVariance(2.0);

fixedSmoother->SetInput(fixedNormalizer->GetOutput());
movingSmoother->SetInput(movingNormalizer->GetOutput());

using TransformType = itk::TranslationTransform<double, Dimension>;
using InterpolatorType = itk::LinearInterpolateImageFunction<InternalImageType, double>;
using RegistrationType = itk::ImageRegistrationMethod<InternalImageType, InternalImageType>;
using MetricType = itk::MutualInformationImageToImageMetric<InternalImageType, InternalImageType>;

auto transform = TransformType::New();
auto optimizer = OptimizerType::New();
auto interpolator = InterpolatorType::New();
auto registration = RegistrationType::New();

registration->SetOptimizer(optimizer);
registration->SetTransform(transform);
registration->SetInterpolator(interpolator);

auto metric = MetricType::New();
registration->SetMetric(metric);

//  The metric requires a number of parameters to be selected, including
//  the standard deviation of the Gaussian kernel for the fixed image
//  density estimate, the standard deviation of the kernel for the moving
//  image density and the number of samples use to compute the densities
//  and entropy values. Details on the concepts behind the computation of
//  the metric can be found in Section
//  \ref{sec:MutualInformationMetric}.  Experience has
//  shown that a kernel standard deviation of $0.4$ works well for images
//  which have been normalized to a mean of zero and unit variance.  We
//  will follow this empirical rule in this example.

metric->SetFixedImageStandardDeviation(0.4);
metric->SetMovingImageStandardDeviation(0.4);

registration->SetFixedImage(fixedSmoother->GetOutput());
registration->SetMovingImage(movingSmoother->GetOutput());

fixedNormalizer->Update();
ImageType::RegionType fixedImageRegion = fixedNormalizer->GetOutput()->GetBufferedRegion();
registration->SetFixedImageRegion(fixedImageRegion);

using ParametersType = RegistrationType::ParametersType;
ParametersType initialParameters(transform->GetNumberOfParameters());

initialParameters[0] = 0.0; // Initial offset along X
initialParameters[1] = 0.0; // Initial offset along Y

registration->SetInitialTransformParameters(initialParameters);

//  Software Guide : BeginLatex
//
//  We should now define the number of spatial samples to be considered in
//  the metric computation. Note that we were forced to postpone this setting
//  until we had done the preprocessing of the images because the number of
//  samples is usually defined as a fraction of the total number of pixels in
//  the fixed image.
//
//  The number of spatial samples can usually be as low as $1\%$ of the total
//  number of pixels in the fixed image. Increasing the number of samples
//  improves the smoothness of the metric from one iteration to another and
//  therefore helps when this metric is used in conjunction with optimizers
//  that rely of the continuity of the metric values. The trade-off, of
//  course, is that a larger number of samples result in longer computation
//  times per every evaluation of the metric.
//
//  It has been demonstrated empirically that the number of samples is not a
//  critical parameter for the registration process. When you start fine
//  tuning your own registration process, you should start using high values
//  of number of samples, for example in the range of $20\%$ to $50\%$ of the
//  number of pixels in the fixed image. Once you have succeeded to register
//  your images you can then reduce the number of samples progressively until
//  you find a good compromise on the time it takes to compute one evaluation
//  of the Metric. Note that it is not useful to have very fast evaluations
//  of the Metric if the noise in their values results in more iterations
//  being required by the optimizer to converge. You must then study the
//  behavior of the metric values as the iterations progress.

const unsigned int numberOfPixels = fixedImageRegion.GetNumberOfPixels();

const auto numberOfSamples = static_cast<unsigned int>(numberOfPixels * 0.01);

metric->SetNumberOfSpatialSamples(numberOfSamples);

// For consistent results when regression testing.
metric->ReinitializeSeed(121212);

//  Since larger values of mutual information indicate better matches than
//  smaller values, we need to maximize the cost function in this example.
//  By default the GradientDescentOptimizer class is set to minimize the
//  value of the cost-function. It is therefore necessary to modify its
//  default behavior by invoking the \code{MaximizeOn()} method.
//  Additionally, we need to define the optimizer's step size using the
//  \code{SetLearningRate()} method.

optimizer->SetLearningRate(15.0);
optimizer->SetNumberOfIterations(200);
optimizer->MaximizeOn(); // We want to maximize mutual information (the default of the optimizer is to minimize)

// Note that large values of the learning rate will make the optimizer
// unstable. Small values, on the other hand, may result in the optimizer
// needing too many iterations in order to walk to the extrema of the cost
// function. The easy way of fine tuning this parameter is to start with
// small values, probably in the range of $\{5.0,10.0\}$. Once the other
// registration parameters have been tuned for producing convergence, you
// may want to revisit the learning rate and start increasing its value until
// you observe that the optimization becomes unstable.  The ideal value for
// this parameter is the one that results in a minimum number of iterations
// while still keeping a stable path on the parametric space of the
// optimization. Keep in mind that this parameter is a multiplicative factor
// applied on the gradient of the Metric. Therefore, its effect on the
// optimizer step length is proportional to the Metric values themselves.
// Metrics with large values will require you to use smaller values for the
// learning rate in order to maintain a similar optimizer behavior.

try
{
registration->Update();
std::cout << "Optimizer stop condition: " << registration->GetOptimizer()->GetStopConditionDescription()
<< std::endl;
}
catch (const itk::ExceptionObject & err)
{
std::cout << "ExceptionObject caught !" << std::endl;
std::cout << err << std::endl;
return EXIT_FAILURE;
}

ParametersType finalParameters = registration->GetLastTransformParameters();

double TranslationAlongX = finalParameters[0];
double TranslationAlongY = finalParameters[1];

unsigned int numberOfIterations = optimizer->GetCurrentIteration();

double bestValue = optimizer->GetValue();

// Print out results
std::cout << std::endl;
std::cout << "Result = " << std::endl;
std::cout << " Translation X = " << TranslationAlongX << std::endl;
std::cout << " Translation Y = " << TranslationAlongY << std::endl;
std::cout << " Iterations    = " << numberOfIterations << std::endl;
std::cout << " Metric value  = " << bestValue << std::endl;
std::cout << " Numb. Samples = " << numberOfSamples << std::endl;

using ResampleFilterType = itk::ResampleImageFilter<ImageType, ImageType>;

auto finalTransform = TransformType::New();

finalTransform->SetParameters(finalParameters);
finalTransform->SetFixedParameters(transform->GetFixedParameters());

auto resample = ResampleFilterType::New();

resample->SetTransform(finalTransform);
resample->SetInput(movingImage);

resample->SetSize(fixedImage->GetLargestPossibleRegion().GetSize());
resample->SetOutputOrigin(fixedImage->GetOrigin());
resample->SetOutputSpacing(fixedImage->GetSpacing());
resample->SetOutputDirection(fixedImage->GetDirection());
resample->SetDefaultPixelValue(100);

itk::WriteImage(resample->GetOutput(), argv[3]);

return EXIT_SUCCESS;
}

## Classes demonstrated#

template<typename TFixedImage, typename TMovingImage>
class MutualInformationImageToImageMetric : public itk::ImageToImageMetric<TFixedImage, TMovingImage>

Computes the mutual information between two images to be registered.

MutualInformationImageToImageMetric computes the mutual information between a fixed and moving image to be registered.

This class is templated over the FixedImage type and the MovingImage type.

The fixed and moving images are set via methods SetFixedImage() and SetMovingImage(). This metric makes use of user specified Transform and Interpolator. The Transform is used to map points from the fixed image to the moving image domain. The Interpolator is used to evaluate the image intensity at user specified geometric points in the moving image. The Transform and Interpolator are set via methods SetTransform() and SetInterpolator().

The method

GetValue() computes of the mutual information while method GetValueAndDerivative() computes both the mutual information and its derivatives with respect to the transform parameters.
Warning

This metric assumes that the moving image has already been connected to the interpolator outside of this class.

The calculations are based on the method of Viola and Wells where the probability density distributions are estimated using Parzen windows.

By default a Gaussian kernel is used in the density estimation. Other option include Cauchy and spline-based. A user can specify the kernel passing in a pointer a KernelFunctionBase using the SetKernelFunction() method.

Mutual information is estimated using two sample sets: one to calculate the singular and joint pdf’s and one to calculate the entropy integral. By default 50 samples points are used in each set. Other values can be set via the SetNumberOfSpatialSamples() method.

Quality of the density estimate depends on the choice of the kernel’s standard deviation. Optimal choice will depend on the images. It is can be shown that around the optimal variance, the mutual information estimate is relatively insensitive to small changes of the standard deviation. In our experiments, we have found that a standard deviation of 0.4 works well for images normalized to have a mean of zero and standard deviation of 1.0. The variance can be set via methods SetFixedImageStandardDeviation() and SetMovingImageStandardDeviation().

Implementaton of this class is based on: Viola, P. and Wells III, W. (1997). “Alignment by Maximization of Mutual Information” International Journal of Computer Vision, 24(2):137-154

See

KernelFunctionBase

See

GaussianKernelFunction

ITK Sphinx Examples:


text:
# $C_c^{\infty}(\Omega)$ dense in $L^2(\mathbb{\Omega})$

Let $\Omega:= ]0,2\pi[^d\subset \mathbb R^d$, and let's consider following spaces:

• $L^2(\mathbb{\Omega}) = L^2(\Omega, \mu_L)$ := space of $\Omega$-valued functions defined on $\Omega$ for which the square of the absolute value is Lebesgue integrable relatively to standart Lebesgue measure.

• $C_c^{\infty}(\Omega) = \{f\in C^{\infty}(\Omega):\,\,\overline{\mathrm{supp}\,f}\subsetneq \Omega\}$ := space of functions that are both smooth, in the sense of having continuous (strong) derivatives of all orders, and compactly supported.

I'm looking for the proof of : $C_c^{\infty}(\Omega)$ is dense in $L^2(\Omega)$.

• Hint: Use the fact that simple functions are dense in $L^2$ – Dunham Jun 5 '17 at 10:54

Let $f\in L^2(]0, 2\pi[)$ and take an approximation to identity $\eta_\epsilon \in C_c^\infty(\mathbb R)$ such that $\operatorname{supp} \eta_\epsilon \subset ]-\epsilon, \epsilon[.$ Then let $f_\epsilon = \eta_\epsilon * f \chi_{[\epsilon, 2\pi-\epsilon]}$ where $\chi_A(x) = 1$ if $x\in A$ and $=0$ if $x \notin A$. Then $f_\epsilon \in C_c^\infty(\Omega)$ and $f_\epsilon \to f$ in $L^2(\Omega)$.


text:
# Understanding Irreflexivity in Relations?

I'm having difficulty understanding irreflexive relations.

I have the definition of an irreflexive relation as: a relation $R$ over a set $A$ if for any $x \in A$, $xRx$ doesn't hold.

Many sources indicate that the relation "less than", for example, is irreflexive in this way ($x<x$ doesn't hold).

My question is: why not? Isn't $x<x$ simply "false"? I may be misunderstanding the meaning of "$xRx$ holds (or doesn't hold)".

For context, my background is in software development, which may be clouding my intuition. It's not as though the expression $2<2$ wouldn't compile, for example; it would just return false, but it seems this isn't mathematically accurate.

A relation on $A$ is formally a collection of ordered pairs of elements $(a,b)$. Generally when we work with a specific example of a relation, we are told a description or definition of our specific relation. For specific example, the relation $\prec$ on the set $\{1,2,3,4\}$ where a pair $(a,b)$ is included in our relation if and only if $a$ is "less than" $b$.

Formally for natural numbers, we can say $a<b$ iff there exists some positive $n$ such that $S^n(a)=b$ where $S(\cdot)$ is the successor function.

We have in this specific example $\prec~=\{(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)\}$

For shorthand we will say $a\prec b$ to mean that $(a,b)\in ~\prec$.

Further, we will say $a\not\prec b$ to mean that $(a,b)\notin~\prec$.

In this example $2\not\prec 2$ is a true statement. $2\prec 2$ is a false statement. To be irreflexive we need $x\not\prec x$ to be true for all $x$. This is the same as $x\prec x$ to be false for all $x$. Worded a third way, that is to say that in the collection of pairs in our relation, there exists no pair of the form $(x,x)$. Our example above is indeed irreflexive.

Doesn't hold literally means false. It means that the statement that x is related to x under relation '<' is false, because x is not related to x under the relation '<'.

"if an element x is not related to another element y under relation R, then xRy is false(or Doesn't hold)."


text:
News

Honda Leases FCX Fuel Cell Car to First Private Consumers

June 30, 2005 by Jeff Shepard

Honda Motor Corp. (Japan) reported that its next-generation, environmentally friendly, FCX fuel cell car has been leased to a family in Los Angeles, marking the first time regular consumers have been able to regularly use the new type of vehicle. The hydrogen-powered car, which seats four, is being leased to the Spallino family in California. The cost of the two-year lease is $500 per month. Jon Spallino was a customer of Honda in the past, and he was selected to use the vehicle because of his interest in environmental problems. He said the car would be used for traveling to work and in family outings. Spallino will fill up on hydrogen fuel at a Honda research facility near his home. The cost to fully refuel the car has been set low, at$7.50. The 3.5 kg of fuel allows the car to run for about 300 km.


text:
## Stylistic Alternates for ച്ച, ള്ള in Manjari and Chilanka fonts

The ligatures for the Malayalam conjuncts ച്ച, ള്ള have less popular variants as shown below

The second form is not seen in print but often in handwritten Malayalam. I have seen it a lot in bus boards especially at Thiruvananthapuram. There are no digital typefaces with the second style, except the Chilanka font I designed. It uses the second variant of ച്ച. I got lot of appreciation for that style variant, but also recieved request for the first form of ച്ച. I had a private copy of Chilanka with that variant and had given to whoever requested. I also recieved some requests for the second style of ള്ള. For the Manjari font too, I recieved requests for second variant.

Today I am announcing the new version of Manjary and Chilanka font, with these two forms as optional variants without the need for a different copy of a font. In a single font, you will get both these variants using the Opentype stylistic alternatives feature.

The default styles of ച്ച and ള്ള are not changed in new version. The fonts comes with an option to chose a different form.

## Choosing the style for webfonts using CSS

Use the font-feature-settings CSS style to choose a style. For the element or class in the html, use it as follows:

For style 1:

font-feature-settings: "salt" 1;

For style 2:

font-feature-settings: "salt" 2;

## Choosing the style variant in LibreOffice

In the place of the font name in font selector, append :salt=1 for first style, :salt=2 for second style. So you need to give Manjari Regular:salt=2 as the font name for example to get second style.

## Choosing the style variant in XeLaTeX

fontspec allows to choose alterate style variants. Use Alternate=N syntax. Note that N starts from 0. So for style1, use Alternate=0 and for style2 use Alternate=2. Refer section 2.8.3 of fontspec documentation.

\documentclass[11pt]{article}
\usepackage{polyglossia}
\newfontfamily{\manjari}[Script=Malayalam]{Manjari}
\begin{document}

\end{document}

This will produce the following rendering:

## Choosing the style variant in Inkscape

Inkscape font selection dialog has a feature to chose font style variants. It uses the property values of CSS font-feature-settng.

In Adobe, Indesign, selecting the ligature will give stylistic alternative(s) if any to choose.

## Anniversary of Manjari font release

Today, July 23 marks one year anniversary of Manjari font release.

Out of all my projects, this is the project that gave me highest satisfaction. I see people using it in social media every day for memes, banners, notices. I have seen the font used for Government publishings, notices, reports. I have seen wedding invitations, book covers, Movie titles with Manjari font. I am so happy that Malayalam speakers loved it.

Kavya and me are working on new version of Manjari with more glyphs to support latest Unicode, and optimize some of the ligature rules. The latest version of the font is always available at https://smc.org.in/fonts

## Detailed font reports using fontreport tool

Google i18n team developed a tool to create detailed report of fonts. The tool named fontreport, produces a multi page PDF with Unicode coverage of the font, what glyphs are in it, what Open Type features it supports, available ligatures, and glyph substitutions. Optionally the tool can also create plain text reports. The PDF is generated using TeX.

I found it very useful to create report for a dozen of fonts I maintain with Swathantha Malayalam Computing community. Sharing the reports it created:

Font reports(PDF):

## Fontconfig language matching

I had to spend a few hours to debug a problem about fontconfig not identifiying a font for a language. Following the tradition of sharing the knowledge you acquired in hard way, let me note it down here for search engines.

The font that I am designing now has 3 style variants, thin, regular and bold. All has same family name. So if you set this family for whatever purpose, depending on context, thin, regular or bold versions will be picked up. Regular is expected by default. Also when you pick the font from font selectors, you would expect, regular being selected by default.

The problem I was facing is, instead of Regular, Bold was getting selected as default. In font selectors, Bold was listed first.

In GNU/Linux systems, this font matching and selection is done by fontconfig. I started with fc-match

$fc-match MyFont MyFontBold.otf: "MyFont" "Bold" So that confirms the problem. After fiddling with os/2 properties , asking in fontconfig mailing list, and reading fontconfig documentation, I found that the lang property fontconfig calculates from Regular variant of font does not include ‘en’ $ fc-list MyFont : family : style : lang
MyFont:style=Bold:lang=aa|ay|bi|br|ch|en|es|eu|fj|fur|gd|gl|gv|ho|ia|id|ie|io|it|mg|ml|nl|nr|nso|oc|om|pt|rm|so|sq|ss|st|sw|tl|tn|ts|uz|vo|xh|yap|zu|an|fil|ht|jv|kj|kwm|li|ms|ng|pap-an|pap-aw|rn|r
w|sc|sg|sn|su|za
MyFont:style=Regular:lang=aa|ay|bi|br|ch|da|de|es|et|eu|fi|fj|fo|fur|fy|gl|ho|ia|id|ie|io|is|it|ki|lb|mg|ml|nb|nds|nl|nn|no|nr|nso|ny|om|rm|sma|smj|so|ss|st|sv|sw|tl|tn|ts|uz|vo|vot|xh|yap|zu|an|f
il|ht|jv|kj|kwm|li|ms|na|ng|pap-an|pap-aw|rn|rw|sc|sg|sn|su|za

I tried to find how fontconfig calculates the languages supported by a font. The minimum set of code points to be included in a font so that fontconfig declare that it supports a given language is defined in the fontconfig library. You can find them in source code. For example, mandatory code points(glyphs that match to it) to be present for English is defined in en.orth file. I cross checked each code points and one was indeed missing from my regular font variant, but bold version had everything. When I added it, all started working normally.

Later fontconfig developer Akira TAGOH told me that I can also use fc-validate to check the language coverage

$fc-validate --lang=en MyFont.otf MyFont.otf:0 Missing 1 glyph(s) to satisfy the coverage for en language And after adding the missing glyph $ fc-validate --lang=en MyFont.otf
MyFont.otf:0 Satisfy the coverage for en language

And now fc-match list Regular as default style

\$ fc-match MyFont
MyFont.otf: "MyFont" "Regular"

## New handwriting style font for Malayalam: Chilanka

A new handwriting style font for Malayalam is in development. The font is named as “Chilanka”(ചിലങ്ക).

This is a alpha version release. Following is a sample rendering.

More samples here.

You may try the font using this edtiable page http://smc.org.in/downloads/fonts/chilanka/tests/ -It has the font embedded

Chilanka/ചിലങ്ക is a musical anklet

A brief note on the workflow I used for font development is as follows

1. Prepared a template svg in Inkscape that has all guidelines and grid setup.
2. Draw the glyphs. This is the hardest part. For this font, I used bezier tool of inkscape. SVG with stroke alone is saved. Did not prepare outline in Inkscape, this helped me to rework on the drawing several times easily. To visualize how the stroke will look like in outlined version, I set stroke width as 130, with rounded end points. All SVGs are version tracked. SVGs are saved as inkscape svgs so that I can retain my guidelines and grids.
3. In fontforge, import this svgs and create the outline using expand stroke, with stroke width 130, stroke height 130,  pen angle 45 degree, line cap and line join as round.
4. Simplify the glyph automatically and manually to reduce the impact of conversion of Cubic bezier to quadratic bezier.
5. Metrics tuning. Set both left and right bearings as 100 units(In general, there are glyph specfic tuning)
6. The opentype tables are the complex part. But for this font, it did not take much time since I used SMC’s already existing well maintained feature tables. I could just focus on design part.
7. Test using test scripts

Some more details:

• Design: Santhosh Thottingal
• Technology: Santhosh Thottingal and Kavya Manohar
• Total number of glyphs: 676. Includes basic latin glyphs.
• Project started on September 15, 2014
• Number of svgs prepared: 271
• Em size: 2048. Ascend: 1434. Descend: 614
• 242 commits so far.
• All drawings are in inkscape. No paper involved, no tracing.

Thanks for all my friends who are helping me testing and for their encouragement.
Stay tuned for first version announcement 🙂

(Cross posted from http://blog.smc.org.in/new-handwriting-style-font-for-malayalam-chilanka/ )

## Meera Tamil font in Ubuntu Trusty Tahr

Ubuntu Trusty Tahr is going to be released on April 17th 2014.

Meera Tamil font, a free licensed unicode font for Tamil will be available in this release.

The font is already available in Debian. In both Ubuntu and Debian you can install the font by

sudo apt-get install fonts-meera-taml

Thanks Vasudev for packaging it for Debian.

## Spurious glyphs in NotoSansMalayalam

NotoSansMalayalam is a font released by Google internationalization team under noto project. I was checking the glyphs of Malayalam and noted a number of spurious glyphs in the font

It is interesting because the font attempted to provide a minimal Malayalam font with reduced glyph set. While attempting that about 10% of the glyphs are either non-existing Malayalam glyphs(Glyphs with dot under consonants) or rarely used glyphs(Glyphs with U+0D62 MALAYALAM VOWEL SIGN VOCALIC L)

Bug filed. It was learned that the last set of glyphs with dots above and below are for Carnatic music notations. They are not defined by unicode, but font used a custom way of representing them with a ligature formed by U+0307.

## Collaboratively edited documentation for Indic font developers

One of the integral building blocks for providing multilingual support for digital content are fonts. In current times, OpenType fonts are the choice. With the increasing need for supporting languages beyond the Latin script, the TrueType font specification was extended to include elements for the more elaborate writing systems that exist. This effort was jointly undertaken in the 1990s by Microsoft and Adobe. The outcome of this effort was the OpenType Specification – a successor to the TrueType font specification.

Fonts for Indic languages had traditionally been created for the printing industry. The TrueType specification provided the baseline for the digital fonts that were largely used in desktop publishing. These fonts however suffered from inconsistencies arising from technical shortcomings like non-uniform character codes. These shortcomings made the fonts highly unreliable for digital content and their use across platforms. The problems with character codes were largely alleviated with the gradual standardization through modification and adoption of Unicode character codes. The OpenType Specification additionally extended the styling and behavior for the typography.

The availability of the specification eased the process of creating Indic language fonts with consistent typographic behaviour as per the script’s requirement. However, disconnects between the styling and technical implementation hampered the font creation process. Several well-stylized fonts were upgraded to the new specification through complicated adjustments, which at times compromised on their aesthetic quality. On the other hand, the technical adoption of the specification details was a comparatively new know-how for the font designers. To strike a balance, an initiative was undertaken by the a group of font developers and designers to document the knowledge acquired from the hands own experience for the benefit of upcoming developers and designers in this field.

The outcome of the project will be an elaborate, illustrated guideline for font designers. A chapter will be dedicated to each of the Indic scripts – Bengali, Devanagari, Gujarati, Kannada, Malayalam, Odia, Punjabi, Tamil and Telugu. The guidelines will outline the technical representation of the canonical aspects of these complex scripts. This is especially important when designing for complex scripts where the shape or positioning of a character depends on its relation to other characters.

This project is open for participation and contributors can commit directly on the project repository.

## New version of Malayalam fonts released

Swathanthra Malayalam Computing project announced the release of new version of Malayalam unicode fonts this week. In this version, there are many improvements for popular Malayalam fonts Rachana and Meera. Dyuthi font has some bug fixes. I am listing the changes below.

1. Meera font was small compared to other fonts. This was not really a problem in Gnome environment since fontconfig allows you to define a scaling factor to match other font size. But it was an issue in Libreoffice, KDE and mainly in Windows where this kind of scaling feature does not work. Thanks to P Suresh for a rework on glyphs and fixing this issue.
2. Rachana, Meera and Dyuthi had wrong glyphs used as placeholder glyphs. Bugs like these are fixed.
3. Virama 0D4D had a wrong LSB that cause the cursor positioning and glyph boundary go wrong. Fixed that bug
4. Atomic Chilu code points introduced in Unicode 5.1 was missing in all the fonts that SMC maintained because of the controversial decision by Unicode and SMC’s stand against that. Issues still exist, but content with code point is present, to avoid any difficulties to users, added those characters to Meera and Rachana fonts.
5. Rupee Symbols added to Meera and Rachana. Thanks to Hiran for designing Sans and Serif glyphs for Rupee.
6. Dot Reph(0D4E) – The glyphs for this was already present in Meera but unmapped to any unicode point. GSUB Lookup tables added to the glyphs according to unicode specification.

For a more detailed change description see this mail thread. There are some minor changes as well.

Thanks to Hussain K H (designer of both Meera and Rachana) , P Suresh, Hiran for their valuable contribution. And thanks to SMC community and font users for using the fonts and reporting bugs. We hope that we can bring this new version in your favorite GNU/Linux distros soon. Wikimedia’s WebFonts extension uses Meera font and the font will be updated there soon. Next release of GNU Freefont is expected to update Malayalam glyphs using Meera and Rachana for freefont-sans and freefont-serif font respectively. We plan to update other fonts we maintain also with these changes in next versions. There are still some glyphs missing in these fonts with respect to the latest unicode version.

## SVG Fonts

This post is some notes on the current state of SVG Fonts.

SVG is not a webfont format. The purpose of SVG fonts is to be embedded inside of SVG documents  (or linked to them), similar to the way you would embed standard  TrueType or OpenType fonts in a PDF.  SVG fonts are text files that contain the glyph outlines represented  as standard SVG elements and attributes, as if they were single vector  objects in the SVG image. Unlike EOT, WOFF, TTF formats , SVG is plain text uncompressed file.

Even though it is not webfont format, some browsers will accept svg in the @fontface css3 declaration.

Firefox and IE does not support SVG Fonts. Here is the bug on Mozilla bugzilla about this with a lengthy discussion –https://bugzilla.mozilla.org/show_bug.cgi?id=119490  This is one of the reason why Firefox does not score ACID3 test – http://www.itcode.org/why-firefox-is-not-scoring-100-in-the-acid3-test . Developers argue that WOFF is sufficient and SVG Fonts does not give any advantage.  Support for SVG Fonts in the web development and font communities has been declining for some time. There’s already been discussion without objection of dropping SVG fonts from the Acid3 test. The community has put forth a proposal in the SVG Working Group to give SVG Fonts optional status.

Browser Support Matrix for SVG Fonts http://caniuse.com/#feat=svg-fonts  IE and FF do not support it. Webkit based browsers support it – Chrome, Epiphany. For browsers not supporting svg features natively there is a flash based javascript library named svgweb http://code.google.com/p/svgweb/

Limitations of svg fonts:

• Not all of the opentype features are available in SVG specification
• For example Indic fonts require many opentype features for correct rendering – see opentype spec of Malayalam http://www.microsoft.com/typography/otfntdev/malayot/shaping.aspx
• Even though SVG Fonts are support is available in some browsers, practically they cannot render SVG fonts for complex scripts such as Indic – Here is a sample svg file with Meera font defined in it – http://thottingal.in/tests/svg/Meera-fontembedding.svg. As you can see, rendering is wrong.
• The main drawback to SVG fonts is there is no provision for font-hinting. The SVG standard states: “SVG  fonts contain unhinted font outlines. Because of this, on many  implementations there will be limitations regarding the quality and  legibility of text in small font sizes. For increased quality and  legibility in small font sizes, content creators may want to use an  alternate font technology, such as fonts that ship with operating  systems or an alternate WebFont format. – http://www.w3.org/TR/SVG/fonts.html”

There is an alternate proposal to use opentype features of the font and use svg just for the glyphs https://wiki.mozilla.org/SVGOpenTypeFonts

Fontforge can be used for creating SVG Fonts. But the created SVG font works only for simple scripts like Latin. Fails to export GPOS/GSUB tables to the SVG- bug report – http://sourceforge.net/mailarchive/message.php?msg_id=27964229 GSUB issue can be solved either by handcoding the unicode sequences for glyphs or by writing an external script. But , more important opentype features- Vowel sign(matra) reordering issues persists.

Eventhough svg fonts by defining font data inside svg itself does not seem to have much interest from developers, using webfonts inside for svg has some importance. Just like web pages, webfonts can be used to render the text inside the svg. The webfont format depends on the browser. Example: http://thottingal.in/tests/svg/Dyuthi-Webfont.svg (Have a look at the source code of the file)


text:
Home > Percent Error > Percent Error Accepted Value Zero

# Percent Error Accepted Value Zero

## Contents

Source(s): 40 years engineering Midgarder · 7 years ago 0 Thumbs up 1 Thumbs down Comment Add a comment Submit · just now Report Abuse Add your answer Percent error when These calculations are also very integral to your analysis analysis and discussion. The term "human error" should also be avoided in error analysis discussions because it is too general to be useful. Thank you in advance! –giliev Dec 22 '15 at 22:07 add a comment| up vote 7 down vote If this is based on any kind of real-world situation, then there should have a peek at these guys

## Percent Error When Theoretical Value Is Zero

If so, people use the standard deviation to represent the error. If the two measurements have the same error E, the error of the difference/sum is sqrt(2) * E. I am interested in the relative error (i.e. Relative difference ( x , y ) = Absolute difference | f ( x , y ) | = | Δ | | f ( x , y ) | =

I need to add references, more formal ones than an answer on question. It is the use of the words "of" and "less/more than" that distinguish between ratios and relative differences.[4] See also Approximation error Errors and residuals in statistics Relative standard deviation Decibel Can a nuclear detonation on Moon destroy life on Earth? Percent Error When Expected Value Is Zero Thank you!! 1 following 4 answers 4 Report Abuse Are you sure you want to delete this answer?

These variations may call for closer examination, or they may be combined to find an average value. Percent Error = 0 Use a vertical table (an independent variable column next to the dependent variable columns) whenever you have the numerical data available. If there are two traces or more on a graph, use different marks for the data points; i.e. http://astro.physics.uiowa.edu/ITU/glossary/percent-error-formula/ Taking the true value as 22.4 liters, what was the percent error of the molar volume of butane?

The percent error equation, when rewritten by removing the absolute values, becomes: %  Error = Experimental − Theoretical | Theoretical | × 100. {\displaystyle \%{\text{ Error}}={\frac {{\text{Experimental}}-{\text{Theoretical}}}{|{\text{Theoretical}}|}}\times 100.} It is important Relative Error When True Value Is Zero Thus, if an experimental value is less than the theoretical value, the percent error will be negative. Images and meme posts Image-only posts should be on-topic and should promote discussion. Consider posting to /r/PhysicsJokes, /r/PhysicsGifs or /r/ScienceImages instead.

## Percent Error = 0

Online Web Apps, Rich Internet Application, Technical Tools, Specifications, How to Guides, Training, Applications, Examples, Tutorials, Reviews, Answers, Test Review Resources, Analysis, Homework Solutions, Worksheets, Help, Data and Information for Engineers, navigate to these guys Gross personal errors, sometimes called mistakes or blunders, should be avoided and corrected if discovered. Percent Error When Theoretical Value Is Zero Defining relative difference is not as easy as defining relative change since there is no "correct" value to scale the absolute difference with. Percent Error When Actual Value Is Zero When y is a reference value (a theoretical/actual/correct/accepted/optimal/starting, etc.

This brainstorm should be done before beginning the experiment so that arrangements can be made to account for the confounding factors before taking data. http://back2cloud.com/percent-error/percent-error-accepted.php Systematic errors cannot be detected or reduced by increasing the number of observations, and can be reduced by applying a correction or correction factor to compensate for the effect. We aim to be a welcoming place for both academics and the general public, and as such posts with no basis in the current understanding of physics are not allowed as Duplicate posts Please make sure that a submission on the same topic has not been posted already. Percent Error When True Value Is 0

The formula given above behaves in this way only if xreference is positive, and reverses this behavior if xreference is negative. Thank you!! Imagine that you are writing your report for a technically literate person who does not know what you did or why. check my blog If you follow these recommendations, your instructors will be happier, you will not lose points because of your report style, and, most importantly, you will be a better engineer.

sort command : -g versus -n flag Does the code terminate? Can Percent Error Be Zero That's it. Pre-prints are accepted, but moderators reserve the right to delete any posts that break the rules regarding unscientific content.

## Mar 8, 2014 Luca Dimiccoli · Vrije Universiteit Brussel Notice that deltaX does not satisfy all the hypotheses of the Hopital's rule.

Please help to improve this article by introducing more precise citations. (March 2011) (Learn how and when to remove this template message) Notes ^ What's a good way to check for Then it will have a standard deviation, or at least quantiles, and you can define the distance from the mean of the $x_{test}$ to $x_{true}$ in terms of these. The best way to account for these sources of error is to brainstorm with your peers about all the factors that could possibly affect your result. Relative Error Zero Denominator That also doesn't help, because this bounds the error to be in the range [0,2], and wherever one of Y_cal, Y_exp is zero, the error normalised this way will be 1,

HELP!!!? Thats what I´m missing most in your question. With this method, problems of source instability are eliminated, and the measuring instrument can be very sensitive and does not even need a scale. news They are important when your actual(exact) value is very large.

Personal errors - Carelessness, poor technique, or bias on the part of the experimenter. One way to define the relative difference of two numbers is to take their absolute difference divided by the maximum absolute value of the two numbers. Privacy policy About Wikipedia Disclaimers Contact Wikipedia Developers Cookie statement Mobile view All rights reserved.

For instance, the absolute difference of 1 between 6 and 5 is more significant than the same absolute difference between 100,000,001 and 100,000,000. Physical variations (random) - It is always wise to obtain multiple measurements over the entire range being investigated. Sometimes a correction can be applied to a result after taking data to account for an error that was not detected. Does AAA+BBB+CCC+DDD=ABCD have a solution for distinct digits A,B,C,D?

Corresponding values of percent difference would be obtained by multiplying these values by 100. Nonstandard scales make data hard to decipher. You can calculate errors not before you define a reference value. Share it.

share|cite|improve this answer answered Feb 18 '14 at 7:34 Claude Leibovici 75.8k94193 In my case, this shifts the problem to where Y_cal + Y_exp is near zero. (However, in The other problem is more general. Shorter questions which are more straightforward to answer will get a better response in /r/AskPhysics. Failure to account for a factor (usually systematic) – The most challenging part of designing an experiment is trying to control or account for all possible factors except the one independent

Several common choices for the function f(x, y) would be: max (|x|,|y|), max (x, y), min (|x|, |y|), min (x, y), (x + y)/2, and (|x| + |y|)/2. The error comes from the measurement inaccuracy or the approximation used instead of the real data, for example use 3.14 instead of π. Unscientific content /r/Physics is a place for the discussion of valid and testable science, not pet theories and speculation presented as fact. Other terms used for experimental could be "measured," "calculated," or "actual" and another term used for theoretical could be "accepted." Experimental value is what has been derived by use of calculation


text:
Public Group

Camera Move Speed

This topic is 3718 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hi all. I use a timedelta to up date the camera, something like this... speed = 80.0f; timedelta = timeElapsed = DXUtil_Timer(TIMER_GETELAPSEDTIME); Camera->walk(Speed1 * timeDelta); This works ok, but when the frame rate goes up to say about 400++ frame it goes really fast what way should I handle this. a.Check frame rate, if to high set speed to a lower speed. b.get the current and last positions and do a distance test and if thats to high set speed.

Share on other sites
Your time delta should be the time elapsed since last frame. So you should use something like this:

newTime = DXUtil_Timer(TIMER_GETELAPSEDTIME);timeDelta = newTime - timeElapsed;timeElapsed = newTime;

• 20
• 10
• 19
• 14
• 20