text:
# Looking for concrete description of a category derived from abelian groups

The category of abelian groups $\mathsf{Ab}$ is the $\mathcal{Ind}$-completion of the full subcategory of finitely presentable abelian groups $\mathsf{Ab}_{fp}$. This is not so special, since the analogous statement holds for any finitary variety e.g. groups, rings, boolean algebras etc.

However one nice property of finitely presentable abelian groups is that they are closed under finite limits, in fact under finite products and subalgebras. Therefore $(\mathsf{Ab}_{fp})^{op}$ has finite colimits, which implies that it forms (essentially) the finitely presentable objects of the locally finitely presentable category $\mathcal{Ind}((\mathsf{Ab}_{fp})^{op})$.

To put it another way, $\mathcal{Ind}((\mathsf{Ab}_{fp})^{op})$ is essentially algebraic and in a formal sense has a presentation by certain restricted "partial" operations and equations.

My question is whether a concrete description of $\mathcal{Ind}((\mathsf{Ab}_{fp})^{op})$ is known.

Note that its dual is not the category of profinite abelian groups, since I am considering the finitely presentable rather than the finite abelian groups.

There are many examples where the analogous construction leads to a well-known category e.g. starting with $\mathsf{Set}$ we obtain $\mathcal{Ind}(\mathsf{Set}_{fp}^{op}) \cong \mathsf{BA}$, starting with $\mathsf{DL}$ we obtain $\mathsf{Poset}$, starting with $\mathsf{Vect}(\mathbb{F})$ we obtain the same again, and likewise for join-semilattices with bottom.

Many thanks.

-
You wrote: "However one nice property of finitely presentable abelian groups is that they are closed under finite limits, in fact under finite products and SUBALGEBRAS". THen I ask: Is a subgroup $H$ of a finitely presentable abelian group $G$, also finitely presentable? It seem (to me) a no trivial question (as the analogous for the quotient). Where can I find a proof? –  Buschi Sergio Sep 5 '13 at 9:29
Edit: I resolved. –  Buschi Sergio Sep 5 '13 at 10:04

Very interesting problem! I'd not seen it before, but from what I can make out, it looks as though this category can be described concretely as having for its objects triples $(A, T, i: A \otimes \mathbb{Q}/\mathbb{Z} \to T)$ where $A$ is an abelian group, $T$ is a torsion abelian group, and $i$ is an injective homomorphism. Morphisms are given by pairs of homomorphisms $A \to A'$, $T \to T'$ that are compatible with the injective homomorphisms. (Hence, something like a gluing construction.)

The $Ind$-completion of the opposite of finitely presented abelian groups is equivalent to the category of left exact functors $\Phi: \text{Ab}_{fp} \to \text{Set}$, so I'll start there.

Finitely presentable abelian groups are the same as finitely generated $\mathbb{Z}$-modules. Every such module $M$ is a product of a finite power $\mathbb{Z}^n$ and a finite abelian group $F$, so that by left exactness $\Phi(M)$ can be written in the form $\Phi(\mathbb{Z})^n \times \Phi(F)$. It makes sense to consider the restriction of $\Phi$ to the full subcategories $\text{Ab}_{\text{fin}}$ (of finite abelian groups) and $\text{Pow}(\mathbb{Z})$ (of finite powers of $\mathbb{Z}$). Each of these subcategories is finitely complete, and the full inclusions are left exact, so that $\Phi$ restricts to left exact functors on each of these two subcategories.

Interestingly, both of these subcategories happen to be self-dual. Thus in the first case we may as well consider the category of left exact functors $\text{Ab}_{\text{fin}}^{op} \to Set$, that is to say the $Ind$-completion of $\text{Ab}_{fin}$, which is the category of torsion abelian groups. Hence the first restricted functor is given by $\hom(-, T)$, where $T$ is a torsion abelian group.

In the second case, we may as well consider the category of left exact functors $\text{Pow}(\mathbb{Z})^{op} \to Set$. The domain is the Lawvere theory of abelian groups; left exact functors are product-preserving functors, so such a functor must be of the form $\hom(-, A)$ for some abelian group $A$. In fact, in this case left exact functors coincide with product-preserving functors, essentially because exact sequences in $\text{Pow}(\mathbb{Z})$ split.

The data $(T, A)$ we have thus extracted do not completely characterize $\Phi$ because we have not taken into account how $\text{Pow}(\mathbb{Z})$ and $\text{Ab}_{\text{fin}}$ interact in $\text{Ab}_{fp}$. We need to consider that $\Phi$ preserves the kernel pair of a morphism $f: \mathbb{Z}^n \to F$ mapping to a finite abelian group. It is easy to convince oneself that $\Phi(f): A^n \to \hom(F, T)$ is a group homomorphism. Since $F$ can be decomposed further as a product of cyclic groups, ultimately we find that the left exactness requirement boils down to the fact that $\Phi$ should preserve exact sequences of the form

$$0 \to \mathbb{Z} \stackrel{- \cdot n}{\to} \mathbb{Z} \to \mathbb{Z}_{n}$$

so that we require exactness of

$$0 \to A \stackrel{- \cdot n}{\to} A \to T_{n}$$

where $T_n$ is the subgroup of elements of $T$ annihilated by $n$. This can be equivalently rephrased as saying that the induced map $A \otimes \mathbb{Z}/(n) \to T \otimes \mathbb{Z}/(n)$ is injective (naturally over all $\mathbb{Z}_n$), and the neatest way of encapsulating all is by passing to the (filtered) colimit over all $\mathbb{Z}/(n)$, which leads to the statement that we have an injective map

$$A \otimes \mathbb{Q}/\mathbb{Z} \to T \otimes \mathbb{Q}/\mathbb{Z} \cong T.$$

There are quite a few details to be checked in this analysis, and I don't claim I've checked every one, but I should imagine this is in the right direction.

-
Thanks, this is very helpful. –  Rob Myers Sep 4 '13 at 12:00
Interesting description. Is this the category of (special) sheaves on some nice space (site)? Then the description should come from a decomposition of the space into an open and a closed set. –  Martin Brandenburg Sep 4 '13 at 23:46
Would you mind providing some extra detail? I am finding it hard to understand how the finitely presentable abelian groups correspond on the dual side. Also, I'd be interested in any connection with Pontryagin duality. Any help much appreciated! –  Rob Myers Jan 23 at 21:52
@RobMyers Sorry, I'm having trouble understanding what your question is exactly. Possibly this is relevant: math.stackexchange.com/questions/126584/… ? Feel free to write me at my email address. –  Todd Trimble Jan 23 at 23:16
@Todd Trimble: Thanks, which email address do you mean -- the topological musings one? –  Rob Myers Jan 24 at 15:14

format: plain


text:
In the studies of Fourier optics, sound synthesis, stellar interferometry, optical tweezers, and diffractive optical elements (DOEs) it is often important to know the spatial frequency phase of an observed wave source. In order to reconstruct this phase the Adaptive-Additive Algorithm (or AA algorithm), which derives from a group of adaptive (input-output) algorithms, can be used. The AA algorithm is an iterative algorithm that utilizes the Fourier Transform to calculate an unknown part of a propagating wave, normally the spatial frequency phase (k space). This can be done when given the phase’s known counterparts, usually an observed amplitude (position space) and an assumed starting amplitude (k space). To find the correct phase the algorithm uses error conversion, or the error between the desired and the theoretical intensities. The AA algorithm is currently being implemented by [http://hillslab.umd.edu/ Dr. Wendell Hill III] , Alex Robel, V. Kotlyar Soifer, and [http://physics.nyu.edu/grierlab/cgh2b/node6.html David G Grier] .

The algorithm

History

The adaptive-additive algorithm was originally created to reconstruct the spatial frequency phase of light intensity in the study of stellar interferometry. Since then, the AA algorithm has been adapted to work in the fields of Fourier Optics by Soifer and [http://hillslab.umd.edu/ Dr. Hill] , soft matter and optical tweezers by [http://physics.nyu.edu/grierlab/cgh2b/node6.html Dr. Grier] , and sound synthesis by Robel.

Pseudo-code algorithm

1. Define input amplitude and random phase 2. Forward Fourier Transform 3. Separate transformed amplitude and phase 4. Compare transformed amplitude/intensity to desired output amplitude/intensity 5. Check convergence conditions 6. Mix transformed amplitude with desired output amplitude and combine with transformed phase 7. Inverse Fourier Transform 8. Separate new amplitude and new phase 9. Combine new phase with original input amplitude 10. Loop back to Forward Fourier Transform

Example

For the problem of reconstructing the spatial frequency phase ("k"-space) for a desired intensity in the image plane ("x"-space). Assume the amplitude and the starting phase of the wave in "k"-space is a $A_0$ and $phi_n^\left\{k\right\}$ respectively. Fourier transform the wave in "k"-space to "x" space.

: $A_0e^\left\{iphi_n^\left\{k xrightarrow\left\{FFT\right\} A_n^fe^\left\{iphi_n^\left\{f$

Then compare the transformed intensity $I_n^f$ with the desired intensity $I_0^f$, where

: $I_n^f = left\left(A_n^f ight\right)^2,$

: $varepsilon = sqrt\left\{left\left(I_n^f ight\right)^2 - left\left(I_0 ight\right)^2\right\}.$

Check $varepsilon$ against the convergence requirements. If the requirements are not met then mix the transformed amplitude $A_n^f$ with desired amplitude $A^f$.

:

where "a" is mixing ratio and

: $A^f = sqrt\left\{I_0\right\}$.

"Note that "a" is a percentage, defined on the interval 0 ≤ "a" ≤ 1.

Combine mixed amplitude with the "x"-space phase and inverse Fourier transform.

:

Separate and $phi^k_n$ and combine $A_0$ with $phi^k_n$. Increase loop by one $n o n + 1$ and repeat.

Limits

*If $a = 1$ then the AA algorithm becomes the Gerchberg–Saxton algorithm.
*If $a = 0$ then .

ee also

* Gerchberg–Saxton algorithm
* Fourier optics
* Holography
* Interferometry
* Sound Synthesis

References

*citation
last=Dufresne
first=Eric
last2=Grier
first2=David G
last3=Spalding
title=Computer-Generated Holographic Optical Tweezer Arrays
journal=Review of Scientific Instruments
volume=72 | issue=3
month=December | year=2000
.
*citation
last=Grier
first=David G
date=October 10, 2000.
url=http://www.physics.nyu.edu/~dg86/cgh2b/node6.html
.
*citation
last=Robel
first=Axel
url=http://ieeexplore.ieee.org/iel5/10376/32978/101109TSA2005858529.pdf?arnumber=101109TSA2005858529
.
*citation
last=Robel
first=Axel
place=University of Berlin Germany
publisher=Einsteinufer 17, 10587
location=Berlin, Germany.
.
*cite book
last=Soifer
first=V. Kotlyar
last2=Doskolovich,
first2=L.
title=Iterative Methods for Diffractive Optical Elements Computation
year=1997
publisher=Taylor & Francis
location=Bristol, PA
isbn=978-0748406340

* [http://staff.chess.cornell.edu/~shen/workshop2003/presentations/Talk_DiFabrizio.pdf A PDF/Power Point Presentation that describes the uses and variations of the AA algorithm] "Berkeley, Ca".
* [http://physics.nyu.edu/grierlab/cgh2b/node6.html David Grier's Lab] Presentation on optical tweezers and fabrication of AA algorithm.
* [http://hillslab.umd.edu/ Hill Labs] "University of Maryland College Park".

Wikimedia Foundation. 2010.

### Look at other dictionaries:

• Gerchberg–Saxton algorithm — The Gerchberg Saxton (GS) algorithm is an iterative algorithm for retrieving the phase of a pair of light distributions (or any other mathematically valid distribution) related via a propagating function, such as the Fourier transform, if their… …   Wikipedia

• Multivariate adaptive regression splines — (MARS) is a form of regression analysis introduced by Jerome Friedman in 1991.[1] It is a non parametric regression technique and can be seen as an extension of linear models that automatically models non linearities and interactions. The term… …   Wikipedia

• Fourier optics — is the study of classical optics using techniques involving Fourier transforms and can be seen as an extension of the Huygens Fresnel principle. The underlying theorem that light waves can be described as made up of sinusoidal waves, in a manner… …   Wikipedia

• List of mathematics articles (A) — NOTOC A A Beautiful Mind A Beautiful Mind (book) A Beautiful Mind (film) A Brief History of Time (film) A Course of Pure Mathematics A curious identity involving binomial coefficients A derivation of the discrete Fourier transform A equivalence A …   Wikipedia

• List of numerical analysis topics — This is a list of numerical analysis topics, by Wikipedia page. Contents 1 General 2 Error 3 Elementary and special functions 4 Numerical linear algebra …   Wikipedia

• Kalman filter — Roles of the variables in the Kalman filter. (Larger image here) In statistics, the Kalman filter is a mathematical method named after Rudolf E. Kálmán. Its purpose is to use measurements observed over time, containing noise (random variations)… …   Wikipedia

• Orthogonal frequency-division multiplexing — Passband modulation v · d · e Analog modulation AM · …   Wikipedia

• Markov chain — A simple two state Markov chain. A Markov chain, named for Andrey Markov, is a mathematical system that undergoes transitions from one state to another, between a finite or countable number of possible states. It is a random process characterized …   Wikipedia

• List of statistics topics — Please add any Wikipedia articles related to statistics that are not already on this list.The Related changes link in the margin of this page (below search) leads to a list of the most recent changes to the articles listed below. To see the most… …   Wikipedia

• Multigrid method — Multigrid (MG) methods in numerical analysis are a group of algorithms for solving differential equations using a hierarchy of discretizations. They are an example of a class of techniques called multiresolution methods, very useful in (but not… …   Wikipedia


text:
# Blender Material Color in Mitsuba (or any other) Shader

I have imported a large WRL file (contains >3000 parts) with colors included (one material for each part!). In Cycles and Blender-Render, the colors are rendered just fine.

But what do I do if I want Mitsuba, Luxrender or Yafaray as renderer? Is there a way to get the Blender-material-color and put that in a 3rd-party material?

I know how to make a material with python and apply it to a mesh. But how do I get the color of the selected object's blender-material?

How to make a Mitsuba, Luxrender or Yafaray matrial is one thing I yet have to find out too.

• Luxrender and Yafaray provide addons for blender which allow the creation of their respective materials from Blender's GUI.
– gandalf3
Feb 12 '15 at 9:07
• Like the "Convert to" button? Yes, unfortunately this does not work :-\
– gilu
Feb 12 '15 at 9:10
• More like an interface specifically designed for creating a material for whichever render engine
– gandalf3
Feb 12 '15 at 9:11
• For BI you can get the diffuse color with bpy.data.materials["Material Name"].diffuse_color. Cycles is trickier due to its node-based nature.
– gandalf3
Feb 12 '15 at 9:13
• Right! But I've imported a WRL with the correct color from CAD. It creates a Blender material with the color from CAD. Now I need ot get this color with python. How can I do that?
– gilu
Feb 12 '15 at 9:14

You can read the mat color from Blender Internal material like so:

# from material
mat = bpy.data.materials['Material_Name']
color = mat.diffuse_color

# or from object
ob = bpy.context.active_object
if len(ob.data.materials):
# get 1st material slots material
mat = ob.data.materials[0]
else:
# no slots
print("No Material")
mat = None
if mat:
color = mat.diffuse_color

To change LuxRenders material diffuse color:

mat.luxrender_material.luxrender_mat_matte.Kd_color = color

Mitsuba:

mat.mitsuba_material.mitsuba_bsdf_diffuse.reflectance_color = color

In Yafaray there is no need to change anything, it will use:

mat.diffuse_color

Here we go! After a few tries it works!

import bpy

if bpy.context.selected_objects != []:
for ob in bpy.context.selected_objects:
if ob.type == 'MESH':
objcolor = ob.active_material.diffuse_color
ob.active_material.mitsuba_material.mitsuba_bsdf_diffuse.reflectance_color = objcolor
ob.active_material.luxrender_material.luxrender_mat_matte.Kd_color = objcolor

This is it! Select all objects and run this script. The diffuse color will be added to Mitsuba and Luxrenderer.

• Nice usage of active_material! If my answer helped and you figured it out pls mark it as correct;) Feb 12 '15 at 9:53


text:
# Question about OpenGL Fog.

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

## Recommended Posts

Hello all, I think this is one of my first posts... In any case, let me go ahead and ask my question. I am trying to teach myself OpenGL, and I have run into something when making fog. Now, here is the code.
GLfloat fogColor[4] = {1.0, 1.0, 1.0, 1.0}; // R, G, B, ?

glFogfv(GL_FOG_COLOR, fogColor);

My question is, when I am declaring the fog color, what is the fourth value there? I know that the first three are the red, green, and blue values, but what is the last one? I was thinking that it was alpha, but I wasn't exactly sure. Thank you for whoever can clarify what it is for me.

##### Share on other sites
I don't think anyone knows what it is, you can even use use fogColor[3] which is just RGB, I think because they are all automatically set to 0 and the fourth variable doesn't change anything whether it's set to 0 or 1.

People suggest using 1 as the fourth number, but I doubt it makes a difference.

If I'm wrong however, I'd love the hear what its real purpose is.

##### Share on other sites
Quote:
 Original post by dalindeckHello all, I think this is one of my first posts... In any case, let me go ahead and ask my question. I am trying to teach myself OpenGL, and I have run into something when making fog. Now, here is the code.GLfloat fogColor[4] = {1.0, 1.0, 1.0, 1.0}; // R, G, B, ?glFogfv(GL_FOG_COLOR, fogColor);My question is, when I am declaring the fog color, what is the fourth value there? I know that the first three are the red, green, and blue values, but what is the last one? I was thinking that it was alpha, but I wasn't exactly sure. Thank you for whoever can clarify what it is for me.

Could be, even the official doc mentioned little:

GL_FOG_COLOR
params contains four integer or
floating-point values that specify C ,
the fog color. Integer values are f
mapped linearly such that the most
positive representable value maps to
1.0, and the most negative representable
value maps to -1.0. Floating-point
values are mapped directly. After
conversion, all color components are
clamped to the range [0,1]. The initial
fog color is (0, 0, 0, 0).

Fog blends a fog color with each rasterized pixel fragment's
posttexturing color using a blending factor f. Factor f is
computed in one of three ways, depending on the fog mode.
...
Regardless of the fog mode, f is clamped to the range [0,1]
after it is computed. Then, if the GL is in RGBA color
mode, the fragment's color C is replaced by
r
C ' = fC +(1-f)C
r r f


text:
# Fundamental Theorem of Calculus Explained

Relation between derivatives and integrals /*! * * Twitter Bootstrap * */ /*! * Bootstrap v3.3.7 (http://getbootstrap.com) * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ html { font-family: sans-serif; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; } body { margin: 0; } article, aside, details, figcaption, figur...
Recently I went through my old Desmos (https://www.desmos.com/) graphs and I'd like to share 5 of my favorites here. There are some additional interesting graphs at the bottom that are cool as well. You can click on the links after each header to edit and interact with the graphs in the browser. Complex Plane Rotation Try it yourself: https://www.desmos.com/calculator/sprwnkggss The goal of this graph is to take a function $f(x)$ and rotate it around the origin by an arbitrary radian a...


text:
## FANDOM

2,276 Pages

Birthday Cake
Level 6 Throw Gag
General information
Minimum Damage: 48
Maximum Damage: 100
Accuracy: Medium
Organic boost: 110 Damage
Targets: One Cog
Minimum carry capacity: 3
Maximum carry capacity: 3
Experience points needed for next gag: 10,000
Lineage
Preceded by:
Whole Cream Pie
Succeeded by:
Wedding Cake
v • d • e

The Birthday Cake is the level six Throw gag. It succeeds the Whole Cream Pie but precedes the Wedding Cake.

## General

The Birthday Cake can be obtained once the toon earns a total of 6,000 Throw skill points. A toon can move up to the next level gag, the Wedding Cake, after earning a total of 10,000 Throw skill points.

At first, the Birthday Cake can deal a maximum damage of "48". The maximum damage gradually increases if the Throw skill bar increases, maximizing to a damage of "100" after obtaining the next gag. If grown on a tree and is organic, the maximum damage increases by four to ten.

As with all Throw gags, except the Wedding Cake, the Birthday Cake targets one cog.

A toon can carry a maximum of three Birthday Cakes.

## Skill points

Previous level Next level
6000 10000
Formula

In equation form: $\frac{X - Y}{(M - O)}$

• X represents the skill points for the next gag
• Y represents the starting point of this gag
• M represents the maximum damage
• O represents the original starting point

To determine the next increase in cog damage for a Birthday Cake, take the number of skill points required to obtain the next gag and divide it by the number of increase (the maximum cog damage - the original cog damage). By using this method, you will get an estimate of the increase in damage.

The Birthday Cake equation:

$\frac{10000-6000}{100-48}=\frac{4000}{52}=76.9$

For every 77 skill points, the Birthday Cake's damage attributes increase.

Damage Skill points
48 6000
50 6154
60 6924
70 7694
80 8464
90 9234
100 10000

## Animation

1. The toon will take out the Birthday Cake (with its candles lit) and hurl it at the targeted cog.
• If the gag hits, it makes a large pink splat on the cog.
• If the gag misses, the cog jumps to the side, avoiding the Birthday Cake.
2. The cog will either return back to normal or be destroyed.

Gag
Ah, sweet victory!

You'll want a second helping, because no other gag can hold a candle to the awesome power of the Birthday Cake! Now you can have your cake and beat 'em, too - so make a wish and blow out some Cogs! With a Toontown Birthday Cake, every day feels like a party! Available at gag shops everywhere. Sold only to Toons qualified to handle the awesome power.

## Trivia

• According to Toon News... for the Amused!, the birthday cake is The Mingler's weakness, because ''they hate anything that celebrates getting older''.
• The Birthday Cake's in-game icon displays 6 candles, which could be a reference to it being the 6th gag of its track.
• According to the trading card, this gag has a base accuracy of 75%.
• A Birthday Cake used together with a Cream Pie Slice is able to defeat a lured level 12 cog.
• Two maxed Birthday Cakes are enough to defeat a level 12 cog.
• A single organic Birthday Cake is able to defeat an unlured level 9 cog.
• A single organic Birthday Cake is able to defeat a lured level 11 cog, rather than just a lured level 10 cog.
• In the Sellbot Factory, there is a gag barrel in the second room that has a picture of this gag on it.
• The trading card states that "no other gag can hold a candle to the awesome power of the Birthday Cake", even though other gags (including the Grand Piano and TNT) are much more powerful than this gag.

## In other languages

Language Name
French Gâteau d'anniversaire
Spanish Pastel de Cumpleaños
German Geburtstagstorte
Brazilian Portuguese Bolo de Aniversário
Japanese ???


text:
## More on the inflammasome

In a previous post I mentioned the inflammasome. Today I heard a talk about this by Jürg Tschopp from Lausanne who is the father of this subject in the sense that the concept and the name were invented in his lab in 2002. I learned that there are many different inflammasomes, i.e. many different protein complexes of this type. The one he concentrated on most in his talk involves a protein called NALP3. The inflammasome is involved with the occurrence or maintenance of inflammation. This may occur as a reaction to PAMPs (pathogen-associated molecular patterns) or DAMPs (danger-associated molecular patterns). The former are sensed by toll-like receptors while the others, less-well known, are associated with NOD-like receptors. He presented a very long list of diseases and other substances causing inflammation which are known or suspected to activate an inflammasome. The substances independent of pathogens mentioned included uric acid crystals, asbestos, alum (which is a constituent of some adjuvants) and nanoparticles. The typical outputs of the inflammasome are IL1$\beta$ and IL18. There is a disease (or rather a group of related diseases) called CAPS (cryopyrin-associated periodic syndromes) where the inflammasome is defective and this presents an opportunity to learn about its functions.

He went on to talk about three diseases where the inflammasome may play an important role: gout, type II diabetes and MS. Gout is a disease where crystals of uric acid accumulate in the joints, causing deformity (he had some pretty horrifying pictures) and intense pain. Gout patients have attacks which can be treated with medication e.g. corticosteroids. Several days of treatment are necessary and the improvement does not last very long. He reported on successes in treating gout with anti-IL1$\beta$. In that case the treatment is effective after one day and can last for a year. This means that the positive effects of one injection lasts a year! He reported similar results on anti-IL1$\beta$ as a treatment for type II diabetes. The prospect he was presenting was that one injection of this substance could replace the innumerable insulin injections of a diabetes patient in a whole year. This treatment is the subject of phase 2 clinical trials by Novartis. It could even be the case that the $\beta$-cells, which have been partially destroyed in this disease, start to regenerate.

In the case of MS Tschopp was linking the inflammasome with IFN$\beta$ therapy. Apparently this substance inhibits activation of the inflammasome. He mentioned experimantal data which show that MS patients being treated with IFN$\beta$ exhibit reduced inflammasome activity in response to certain antigen challenges in comparison to healthy controls. I must say that some of the things I heard in this lecture sounded almost too good to be true. The speaker himself said that he has found the success of some of the clinical trials very surprising. Maybe this is really the beginning of a major new development in medicine. Could anti-IL1$\beta$ overtake anti-TNF$\alpha$ some day?

### One Response to “More on the inflammasome”

1. hydrobates Says:

I was dismayed to learn that Juerg Tschopp died of a heart attack on 22nd March 2011, only a few months after he gave this lecture. I can only hope that the routes to medical advances he has pioneered will be carried on by others.


text:
My Math Forum Cyclical Permutation Problem

 Algebra Pre-Algebra and Basic Algebra Math Forum

 August 31st, 2010, 11:29 AM #1 Newbie   Joined: May 2007 Posts: 18 Thanks: 0 Cyclical Permutation Problem Hey guys! Can one of you help me with the following problem? Prove that if a number of n digits, expressed in the scale of r, is divisible by any factor of r^[n-1], that divisibility is not altered by a cyclical permutation of the digits of the original number. Thank!
August 31st, 2010, 01:40 PM   #2
Math Team

Joined: Dec 2006
From: Lexington, MA

Posts: 3,267
Thanks: 408

Re: Cyclical Permutation Problem

Hello, morning_mood!

Please check the wording of the problem.
As stated, the claim is not true.

Quote:
 $\text{Prove that if a number of }n\text{ digits, expressed in the scale of }r$ $\text{is divisible by any factor of }r^{n-1},\,\text{ that divisibility is not altered}$ $\text{by a cyclical permutation of the digits of the original number.}$
$\text{Let }n \,=\,3 \;\;\;\cdots\;\;\text{We have a 3-digit number, }N.$

$\text{Let }r\,=\,10\;\;\cdots\;\;N\text{ is expressed in base 10.}$

$\text{And }N\text{ is divisible by any factor of }10^2 \:=\:2^2\,\cdot\,5^2\;\;\cdots\;\text{ say, 5.}$

$\text{So, }N\text{ could be }175\text{, which is divisible by 5.}$

$\text{It is claimed that }751\text{ and }517\text{ are divisible by 5.}$
[color=beige]. . . . . . . . . . . . . . [/color][color=red]? ? ?[/color]

 August 31st, 2010, 04:31 PM #3 Senior Member     Joined: Jul 2010 From: St. Augustine, FL., U.S.A.'s oldest city Posts: 12,211 Thanks: 521 Math Focus: Calculus/ODEs Re: Cyclical Permutation Problem I'm guessing it should be r^n - 1, not r^(n - 1).
 August 31st, 2010, 07:49 PM #4 Math Team   Joined: Dec 2006 From: Lexington, MA Posts: 3,267 Thanks: 408 Re: Cyclical Permutation Problem The problem is similar to a phenomenon in base-ten. If a number $N$ is divisible by 9, then any cyclic permutation [color=beige]. . [/color] of the digits of $N$ is also divisible by 9.
 September 1st, 2010, 04:29 AM #5 Newbie   Joined: May 2007 Posts: 18 Thanks: 0 Re: Cyclical Permutation Problem You guys are right, it should have been r^1 - 1. I got confused about how write powers here and reported the problem incorrectly. Thanks for the help!

 Tags cyclical, permutation, problem

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post superconduct Algebra 3 January 16th, 2014 03:54 AM hamburgertime Algebra 3 May 12th, 2013 05:58 AM zengjinlian Algebra 17 April 28th, 2013 05:27 AM Sambit Algebra 1 January 17th, 2011 01:08 PM Ahmed Abdullah Number Theory 2 August 20th, 2007 08:14 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top


text:
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Filter by Categories
Acknowledgements
Book Review
Book Reviews
Classics In Indian Medicine
Clinical Case Report
Clinical Case Reports
Clinical Research Methods
Clinico-pathological Conference
Conferences
Correspondence
Editorial
Eminent Indians in Medicine
Errata
Erratum
Everyday Practice
Film Review
History of Medicine
HOW TO DO IT
Images In Medicine
Indian Medical Institutions
Letter from Bristol
Letter from Chennai
Letter From Ganiyari
Letter from Glasgow
Letter from London
Letter From Mumbai
Letter From Nepal
Masala
Medical Education
Medical Ethics
Medicine and Society
News From Here And There
Notices
Obituaries
Obituary
Original Article
Original Articles
Review Article
Selected Summaries
Selected Summary
Short Report
Short Reports
Speaking for Myself
Speaking for Ourselve
Speaking for Ourselves
Students@nmji

Medicine and Society
35 (
5
); 303-307
doi:
10.25259/NMJI_539_20

# Opioid: Plenitude versus pittance

KIMS Cancer Centre, Kalinga Institute of Medical Sciences, KIIT University, Bhubaneswar 751024, Odisha, India
Licence
This is an open-access article distributed under the terms of the Creative Commons Attribution-Non Commercial-Share Alike 4.0 License, which allows others to remix, tweak, and build upon the work non-commercially, as long as the author is credited and the new creations are licensed under the identical terms.

[To cite: Mohanti BK. Opioid: Plenitude versus pittance. Natl Med J India 2022;35:303–7.]

## Abstract

The opioid crisis in the USA and in other developed countries can potentially affect low- and middle-income countries (LMICs). The licit medical use of opioids has two sides. The USA and high-income countries maintain abundant supply for medical prescription. Between 1990 and 2010, the use of opioids for cancer pain relief was overtaken by a dramatic rise in the opioid prescriptions for non-cancer acute or chronic pain. The surge led to the opioid epidemic, recognized as social catastrophe in the USA, Canada and in some countries in Europe. From 2016, the medical community, health policy regulators and law-makers have taken actions to tackle this opioid crisis. On the other side, formulary deficiency and low opioid availability exists for three-fourths of the global population living in LMICs. Physicians and nurses in Asia and Africa engaged in cancer pain relief and palliative care face a constant paucity of opioids. Millions of patients in LMICs, suffering from life-modifying cancer pain, do not have access to morphine and other essential opioids, due to restrictive opioid policies. Attention will be needed to improve opioid availability in large parts of the world, even though the opioid crisis has led to control the licit medical use in the USA.

‘It is a shame that we possess such insufficient knowledge concerning the character of pain— those symptoms which represent the essential part of all bodily suffering of man.’

ALFRED GOLDSCHEIDER, 1894

## INTRODUCTION

‘Something isn’t quite right.’ This is most often an expression which should draw medical attention to the individual’s pain experiences.1 Pain is considered the oldest and most recognized of all symptom burdens associated with both acute and chronic diseases. Pain intensity can vary from mild to severe, and different analgesics are prescribed according to different pain levels. Human suffering is conspicuous when the pain intensity is moderate-to-severe and is chronic in nature.

The history of analgesia in medical practice records the use of poppy (Papaver somniferum) and its derivatives in different forms since 1500 BC. The medicinal use of poppy juice gained acceptance in Europe, during the middle ages. Many influential European doctors prescribed it for pain relief and observed both soporific and euphoric effects. Towards the second-half of the 17th century, laudanum, a cocktail of opium mixed with sherry was introduced by Thomas Sydenham, an English physician.2 Between the 18th and 19th centuries, India became the largest producer and exporter of poppy latex.3 Worldwide, the use of opioids, with or without medical advice, has witnessed an unabating rise in the past 400 years.

In 1986, a structured approach to cancer pain relief was designed as the ‘analgesic ladder’ by the WHO.4 Over the next 15 years, the medical community adopted this ladder to treat pain in most non-cancer conditions and strong opioids in step-3 of the WHO ladder became the cornerstone for management of chronic pain.

Yet, like Janus, the two-faced Roman god, opioids exhibit high benefits and hazardous consequences for the patients.5 Nevertheless, medical practitioners prescribe these drugs as the panacea for all types of pain and often ignore the scientific basis of the analgesic ladder, monitoring and early warning signals. In the past 10 years, long-term prescriptions for medical use and the large quantities of illicit supply are two factors that have created an epidemic of opioid-related deaths, emergency visits and adverse health issues as reported in the medical literature and public media, mainly emanating from the USA and Canada.6

One BBC news feature on 26 March 2019 with the headline, ‘Sackler-owned Purdue pharma settles opioid lawsuit for $2790 million’7 brought society face to face with the opioid crisis. This has led to stricter guidelines,8 punitive actions and a political urgency for control of opioid use through policies in the USA. On the other side, in most countries in Asia and Africa, there is widespread unrelieved pain experienced by millions due to neglect and lack of recognition within the health system.9 The WHO’s access to controlled medications programme, in consultation with the International Narcotics Control Board, has identified that medical use of opioids is dismally low or nonexistent in low- and middle-income countries (LMICs).10 Despite advances in cancer management, the provision of palliative care in these two continents, with nearly 5.9 billion out of 7.7 billion inhabitants globally (76% of world population), continues to be highly inconsistent. The return of opiophobia, as a possible consequence of the epidemic in the USA, can influence health policy-makers and law-enforcing agencies in Asia and Africa to further restrict the medical use of opioids for cancer and chronic pain management. I discuss the two sides of the licit medical use of opioids, not necessarily as the USA and Canada versus Asia and Africa, to reduce the formulary deficiency and improve opioid prescription for nearly three-fourths of the global population. ## PART A ### The genesis The scourge of opioid addiction, in the 21st century, has impacted every sociodemographic community in the USA leading to severe healthcare and societal burden of epidemic proportions with an economic cost of over US$ 500 billion per year.11 Opioid-related deaths have increased every year for the past two decades, resulting in a drug overdose epidemic that killed more than 64 000 Americans in 2017.

The historical context of the present menace could be traced back to the 1970s and 1980s. A few influential studies and reports, published by palliative care and pain specialists, articulated the perception that the use of morphine and its derivatives for pain relief were not addictive. Hence, the following became the guiding policies for health professionals.12

1. Chronic pain, both malignant and non-malignant in origin, and certain forms of severe acute pain can be relieved by opioids only.

2. Badly under-treated pain can cause high levels of emotional and physical stress.

3. Long-term use of opioids carries a low-risk of addiction, overuse or misuse.

In 1995, the American Pain Society (APS) introduced a campaign entitled ‘Pain is the fifth vital sign’. This urged a more aggressive use of opioids, and was included in the subsequent consensus statement that endorsed opioid prescription for persistent pain unrelated to cancer.13

The medical world is known to show an assembly approach towards a new drug, biomedical device, or therapeutic intervention until the negative and harmful effects are substantially proven. The widespread enthusiasm to use COX-2 inhibitors, as the magic non-steroidal anti-inflammatory drug (NSAID) and the subsequent realization of adverse effects, is a classic recent example.14

From the early 1980s till the beginning of the 21st century, the pro-opioid cultural and regulatory approvals created a simple message: Pain must be treated adequately with opioids, and without the fear of iatrogenic addiction.15 Thus, assertive recommendations paved the way for pain management as a pillar of human rights and urged the doctors, hospitals and health system providers in the USA and Canada to refrain from withholding opioid prescriptions.2,7,12 Any repudiation or evidence showing the harms of opioid use were dismissed, in good faith, towards a humanitarian cause.

### The foundation shaken

The appropriate opioid use at the end of life and in advanced cancer continues to remain invaluable.8,10,12 However, since 2002, it has been reported that the most prescribed drug in the USA is an opioid: Hydrocodone in combination with acetaminophen (paracetamol). More than 200 million such prescriptions were signed and dispensed annually. The rise in opioid prescriptions is attributable to their increased long-term use for chronic nociceptive pain not related to cancer in spite of limited or no evidence of effectiveness.6,7,12,13 Osteoarthritis, low back pain, knee/hip replacement pain, post-surgery and/or, poly-trauma pain, etc. are some of the conditions for which the evidence of effectiveness and the safety of long-term opioid use is weak or non-existent. Studies have identified substantial risk, as high as 50%, of opioid misuse or iatrogenic addiction among patients who are prescribed opioids for non-cancer pain relief.15

The understanding of the pathophysiology of pain, for cancer and non-cancer diseases, is fairly recent and the drug measures for pain relief are limited.2,6,8,12 The biological and physiological components of pain demand judicious medical practice. In terms of their analgesic action, opioids are broadly classified as shown in Table I.

Unfortunately, adherence to such a distinction in analgesic prescription practice has remained a challenge. For example, transdermal opioids, fentanyl and buprenorphine, are frequently used for both malignant and non-malignant chronic pain. Fentanyl is 100 times more potent than morphine. The medical use of transdermal opioids requires a combination of factors to be weighed carefully, such as equivalence of morphine dose, pharmacokinetics and suitable indications.5,6,15

How has the licit opioid prescription in the USA evolved into an epidemic?16 Pain management has created a complex new regime, attributable to three factors: (i) enthusiastic prescription of opioids; (ii) overdrive from the pharmaceutical industry; and (iii) transition from the licit market to illicit drug peddling in society.6,7,12,15 Opioids constitute an important class of neurotransmitters that are involved in pain control, and are well known to enhance pleasure and addiction.2,5,6 As illicit psychoactive drugs, fentanyl and heroin its precursor, account for a huge trade through traffickers and dark web for recreational use and/or abuse.6,15

It is universally accepted that a profit motive is the underlying driver of all business activities. Much before black tar heroin and Purdue Pharma’s miracle drug oxycontin; the British rulers throughout the 19th century, under the sanctimonious argument of free trade, had pushed opium cultivation in India and its trade between India and China. Amitav Ghosh, the author of Sea of poppies, in his well-researched and nuanced depiction, brings out the trade–war tragedy, ‘Does it not trouble you, Mr Burnham, to invoke God in the service of opium?’ Ghosh’s narrative may be tantamount to historical fiction surrounding the system of colonization, yet the gains of the opium trade were at the cost of the lives of millions.3 A similar template was used by Purdue Pharma and the larger pharmaceutical industry to push physicians to address the ‘fifth vital sign’ and to actuate a pain-free society.7,12,16

### Facing the crisis

The SUPPORT for Patients and Communities Act, 2018 was enacted as a federal law, in a timely need for society.17 This Act is specifically aimed at US citizens: (i) to address substance use disorders; (ii) to promote opioid recovery; and (iii) to extend treatment provisions for patients and communities. Earlier in 2016, the Centers for Disease Control and Prevention (CDC) issued, ‘CDC Guideline for Prescribing Opioids for Chronic Pain-United States, 2016’, aimed at physicians and medical establishments treating pain conditions for more than 3 months and on long term.8

Since 2016, the opioid crisis is a major issue within the health systems, mainly in the USA and spilling over to Canada and Europe. The US millennials are dying at high rates leading to a decline in the country’s life expectancy curve. The death rate for the age group of 15–24 years rose by 19.75% from 2006 to 2015. The explanation correlates with opioid overdose deaths among the young.18

Health researchers are identifying more harms than benefits of prolonged opioid therapy, both for non-cancer as well as for cancer pain.19,20 Pain relief or comfort from opioid therapy does not necessarily lead to improvements in other aspects of health. On the contrary, adverse effects can lead to significant physical deterioration and unintended respiratory depression, and early death can occur when opioid therapy is poorly monitored.5,6,8,12,13,16 Long-term prescription of strong opioids and the subsequent surge in seekers from the illicit routes are well documented in the USA.8,12,15,18

According to the International Narcotics Control Board (INCB) Report, 2018, one can find large variations in the types of opioids that are used in different countries. For example, of the five countries (USA, Canada, Germany, Denmark, Austria) with the highest prescription rates, German physicians are more likely to prescribe fentanyl, while hydrocodone is widely used in the USA but barely prescribed elsewhere.21 Till 2014, persons with hydrocodone prescriptions could get refilled easily at the local pharmacy as it was a Schedule III drug. Subsequently, it has been classified as a Schedule II drug with more stringent medical use. There is little clinical justification for hydrocodone in long-term pain relief practice. Similarly, fentanyl preferred as a dermal patch in Germany or abused for pleasure-seeking through the illicit market in the USA, is 50–100 times more potent than oral morphine, with unclear understanding about its dosage and pharmacokinetics.6

The APS has endorsed aggressive action by the National Institutes of Health to accelerate scientific solutions to help resolve the nation’s opioid crisis, and to fund for research on opioid misuse and pain management. Health professionals are learning not to equate chronic non-cancer pain with cancer pain suitable for an opioid prescription. Moreover, the recommendation for the ‘fifth vital sign’ has been retracted in 2016, and the APS has amended its advocacy for pain relief in the past few years.13 Underpinning our knowledge, the existing analgesia prescription may not be always efficacious to completely eliminate pain in all the treated patients.

## PART B

### Continuing with pain

There exists the other side of our dystopian palliative care world in the continents of Asia and Africa. Every year, nearly 6 million persons die from cancer without sufficient analgesics or often without any treatment of their pain.9,10 Seventy to eighty per cent of patients diagnosed with cancer in these countries have a survival expectancy of 1 to 2 years. Medically and rightfully, 30%–50% of these patients need opioid prescription for their intractable pain. Historically, global policy-makers have paid little attention or have undertaken insufficient measures towards this huge gap in health system delivery.22

Since the advocacy for cancer pain management in 1986 under the WHO’s analgesic ladder,2,4 the persisting under treatment of cancer pain in Asia and Africa is a result of inadequate availability of strong opioids.9,10,21,22 Several predisposing circumstances are the reasons, namely, (i) excessively restrictive policies and complex procedures that govern the licence for medical use; (ii) limited duration of opioid prescription; (iii) burdensome procedures to report and document opioid prescriptions; and (iv) limited number of physicians and nurses with adequate training and exposure to manage moderate-to-severe pain.10,22,23

Pain specialists, palliative care physicians and the public in Asia and Africa have struggled in the past 30 years to improve access for medical use of opioids. The geographical, political, social and cultural contexts have not been easy to negotiate. To protect themselves against the harms of drug dependence, policy-makers and governments in many countries introduced drug control measures, but in doing so adversely impacted the availability and use of controlled medicines for medical use.9,10 It is estimated that because of the low supply and poor access to palliative care, although 75% of cancer deaths occur in LMICs, <15% of those dying with cancer pain receive an opioid prescription.9,10,23

### Progress and pittance

The global supply of legal opioids, similar to its Janus disposition,5 has the two sides of plenitude versus pittance.

Since the introduction of the ‘gate control theory of pain’ in 1965,24 steady scientific progress towards better understanding of pain mechanisms, and improved management of pain disabilities have occurred within the health system.2,15 Cancer-related pain, from time of diagnosis, till the end-of-life is experienced by more than 50% of patients. The alleviation of moderate-to-severe pain improves the quality of life and survival trajectory.2,4,9 This focus has led the western world to improve the availability of cancer pain medication, opioids in particular.

The 7th World Health Assembly in its resolution WHA 70.12 of 2017 reiterated and urged the Member States, ‘to provide pain relief and palliative care in line with resolution WHA 67.19 (2014) on the strengthening of palliative care as a component of comprehensive care throughout the life course’.25 However, the continued shortfall in the supply of and access to opioids in Asia and Africa proves to be the hurdle in affordable services.9,10,22,23 The opium poppy plant (Papaver somniferum) is the source from which alkaloids such as morphine, thebaine, oripavine and codeine are extracted for manufacturing the medicinal drugs. According to the INCB report,21 in 2017, India was the leading licit agricultural producer and exporter of raw opium, accounting for 98.4% of global production, with a manufacturing capacity of 380.4 tonnes of morphine. Of the total morphine produced, only 10.8% of the product was sourced for palliative care use. In LMICs, 13.6% of morphine for pain relief was prescribed, which amounted to 1.6% of the total manufacture of morphine globally.21 Moreover, India does not figure in the top 10 countries as a manufacturer or consumer of licit morphine. Indian farmers hold on to non-remunerative lands, the quality of poppy straw has declined in the past 5 years, and the two government-owned opium and alkaloid factories are in financial distress. These combined factors have led to a situation, in India, of importing 20 000 kg of codeine phosphate. The striding ‘Make in India’ approach has the unique opportunity to give a qualitative focus to the entire chain of opium cultivation, land allocation and monitoring, support price to farmers, manufacturing of opium alkaloids, and licensing to drug companies for the production of codeine, morphine and other opioids. This will give a big boost to affordable palliative care in India and can support the palliative care services in Asia and Africa, where India is a major supplier of generic drugs. In addition, this can improve the recommendations from INCB and WHO, because the country-wise use of morphine for cancer pain relief, remains far from optimal in LMICs.8,9,2123

### Caution and improvement

The real and potential hazards including dependence, addiction, emergency visits, respiratory depression and deaths related to prescription opioids in the USA and the western world are widely recognized. Health system personnel who prescribe opioids in LMICs should acknowledge the emerging information, ‘the well intentioned efforts to treat cancer pain can inadvertently lead to opioid use disorder, even if the patients follow medical direction precisely’.18

While prescribing opioids, it was advocated within the WHO cancer pain relief ladder,4 to monitor and record all adverse effects in a timely manner. However, the different settings of most patients, in LMICs, who are on long-term morphine or other opioid therapy make it impractical for any supervised documentation of toxicities and addiction. Often, the refilling of prescription at the palliative care facility or hospital is done on the statement of family caregivers. This poses several challenges. Unlike awareness in western countries to record and analyse opioid-related adverse drug events (ORADEs), which occur in 10%–15% of patients,12,15 such reporting is not routine in LMICs. In fact, the literature search of published studies, reports and papers from Asia and Africa lack any substantive findings related to iatrogenic dependence, ORADEs, opioid overdose-related emergency visits or death rates; whereas the safe use of opiates or no evidence of diversion in these regions have been adequately highlighted.9,23

The open-ended and liberal long-term prescription of opioids has caused enormous burden on the health system in the USA. In recent years, several predisposing factors for ORADEs are identified, such as elderly age, woman gender, comorbid conditions, habitual alcohol or drug abuse, depression or psychosis, and organ failure. To improve the prescription practice and reduce the harms, these factors should not be ignored.12,17 Thus, there is a timely need for the medical community in LMICs to learn from the opioid crisis in the USA, mainly the salient cautionary points reported from the long-term opioid therapy for chronic non-cancer pain.6-8,11-13,15

The health systems and policy-makers in LMICs should engage with renewed knowledge to increase the establishment and spread of palliative care facilities and pain relief measures.26

1. Patients with cancer pain need provision of opioid therapy.

2. Medical units for pain and palliative care should be started for the ease of access to millions of suffering patients.

3. Palliative care facilities for a defined population or geographical region should be considered a quality indicator of the health system.

4. Doctors, nurses and paramedics should be imparted special training on pain management and medical use of opioids; including dosage, duration, refill, adverse effect record; and how or when it can be withdrawn/stopped.

5. Long-term opioid prescription, and cancer survivors receiving opioid therapy for more than 1 year, should form a group for special attention towards documentation and research.

The CDC guidelines,8 and the subsequent regulatory Act17 were implemented in recent years to mitigate the serious effects on people’s health. With mounting evidences of ORADEs, the cancer pain relief guidelines of 19864 have been revised by WHO in 2019. The new recommendation of the WHO recognizes the lack of level-1 evidence, in human subjects, for long-term safety and efficacy of opioid therapy in reducing chronic pain and improving function.27 Simultaneously, the non-opioid methods and interventions, such as psychological, anaesthetic/ neurosurgical and radiotherapy, should be focussed on in clinical trials.

## CONCLUSION

The ‘art of medicine’ demands to respect the science and struggle along the way in pain relief measures; more importantly the licit use of opioid therapy for every section of society. Every year, the affluent American, per capita, consumes opioid derivatives 2000 times higher than an adult from India. The low quantity of medicinal morphine and other opiates consumed in Asia and Africa, despite abundant production of raw materials, is linked to the restrictions and health system deficits in LMICs. Palliative care and cancer pain management improves dramatically when policy changes enable access to essential pain medicines including opioids for these deprived population in the world.

It will be prudent to recognize that the opioid crisis could also spread to LMICs, where physicians can inappropriately start and incorrectly continue long-term opioid therapy. The knowledge, training and skill sets, with adequate safeguards for and reporting of ORADEs, can further improve the confidence of the public and increase the policy accessibility from government agencies. Palliative care in LMICs will need trustful approaches from all stakeholders within the global health system, despite the ongoing opioid crisis in the developed world.

None declared

## References

1. , . Patient-initiated pain expressions: Interactional asymmetries and consequences for cancer care. Health Commun. 2020;35:1643-55.
2. . A capsule history of pain management. JAMA. 2003;290:2470-5.
3. . Sea of poppies. New York: Farrar, Straus and Giroux;
4. . Cancer Pain Relief. . Geneva: WHO; Available at www.who.int/iris/handle/10665/43944 (accessed on 3 May 2019)
5. . Opioids: A two-faced Janus. Curr Med Res Opin. 2011;27:439-48.
6. , , , . An epidemic of the use, misuse and overdose of opioids and deaths due to overdose, in the United States and Canada: Is Europe next? Bone Joint J. 2017;99B:856-64.
7. . Sackler-owned Purdue Pharma settles opioid lawsuit for \$2790m.
8. , , . CDC guideline for prescribing opioids for chronic pain-United States, 2016. JAMA. 2016;315:1624-45.
9. , , , , , , et al. Alleviating the access abyss in palliative care and pain relief-an imperative of universal health coverage: The Lancet Commission Report. Lancet. 2018;391:1391-454.
10. , . Adequacy of opioid analgesic consumption at country, global, and regional levels in 2010, its relationship with development level, and changes compared with 2006. J Pain Symptom Manage. 2014;47:283-97.
11. . The Underestimated Costs of the Opioid Crisis. . Available at www.whitehouse.gov/sites/whitehouse.gov/files/images/The_Underestimated_Cost-of_the_Opioid_Crisis.pdf (accessed on 17 Jun 2019)
12. , , , , , . A brief history of the opioid epidemic and strategies for pain medicine. Pain Ther. 2018;7:13-21.
13. , , . “Pain as the fifth vital sign” and dependence on the “numerical pain scale” is being abandoned in the US: Why? Br J Anaesth. 2018;120:435-8.
14. , , , , , , et al. Cyclooxygenase-2 inhibitors: A painful lesson. Cardiovasc Hematol Disord Drug Targets. 2006;6:85-100.
15. , , , . Moving beyond misuse and diversion: The urgent need to consider the role of iatrogenic addiction in the current opioid epidemic. Am J Public Health. 2014;104:2023-9.
16. . Tracing the US opioid crisis to its roots. Nature. 2019;573:S10-S12.
17. SUPPORT for Patients and Communities Act. . Available at https://docs.house.gov/Billsthisweek/20180924/HR6.pdf (accessed on 11 Jun 2019)
18. . Millennials hit hard by opioids. US News.
19. , , , , , . Pain, opioid therapy, and survival: A needed discussion. Pain. 2020;161:496-501.
20. , . Balancing the risks and benefits of opioid therapy: The pill and the pendulum. Mayo Clin Proc. 2019;94:2385-9.
21. Report of the International Narcotics Control Board for 2018. Available at www.incb.org/.../AnnualReports/AR2018/...Report/Annual_Report_2018_E_.pdf (accessed on 20 Jun 2019)
22. , , , , , , et al. Global cancer control: Responding to the growing burden, rising costs and inequalities in access. ESMO Open. 2018;3:e000285.
23. , , , , , , et al. Analgesic prescription patterns and pain outcomes in Southeast Asia: Findings from the analgesic treatment of cancer pain in Southeast Asia study. J Glob Oncol. 2018;4:1-10.
24. , . Pain mechanisms: A new theory. Science. 1965;150:971-9.
25. Seventieth World Assembly. WHA 70.12. Cancer Prevention and Control in the Context of an Integrated Approach. Available at https://apps.who.int/gb/ebwha/pdf_files/WHA70/A70_R12-en.pdf (accessed on 9 Jul 2020)
26. , , , , , . Solving the global crisis in access to pain relief: Lessons from country actions. Am J Public Health. 2019;109:58-60.


text:
## Building from Source

### Linux

These instructions are for Linux.

1. Download the source for the plugins for the appropriate version of OpendTect from Github

2. Use the OpendTect installation manager to install the OpendTect developer packages and install any other packages required for compiling and building code for your operating environment as per the OpendTect Programmer's Manual

3. Start OpendTect

4. Select the Utilities-Tools-Create Plugin Devel. Env. menu item to create a development work folder (eg /home/user/ODWork).

5. Unzip the attribute source zip archive downloaded in step 1 in the development work folder. This will overwrite the CMakeLists.txt in the development work folder and add the plugin source folders to the plugin folder.

6. Optionally edit CMakeCache.txt in the development work folder and change Debug to Release.

7. Open a terminal, cd to the development work folder and type:

    cmake .
make

1. This should create the binary files for each plugin, lib*.so and libui*.so, in the bin folder (eg in ODWork/bin/lux64/Release/) and four *.alo files for each plugin in the root of the development work folder.

### Windows

These instructions are for Windows.

1. Download the source for the plugins for the appropriate version of OpendTect from Github

2. Use the OpendTect installation manager to install the OpendTect developer packages and install any other packages required for compiling and building code for your operating environment as per the OpendTect Programmer's Manual

3. Start OpendTect

4. Select the Utilities-Tools-Create Plugin Devel. Env. menu item to create a development work folder (eg c:\Users\user\ODWork).

5. Unzip the attribute source zip archive downloaded in step 1 in the development work folder. This will overwrite the CMakeLists.txt in the development work folder and add the plugin source folders to the plugin folder.

6. Follow the instructions in the OpendTect Programmer's Manual to configure and build the plugins.

7. This should create the binary files for each plugin in the bin folder (eg in ODWork\bin\win64\Release).

On Windows you must use "Release" build plugins with the "Release" version of OpendTect.


text:
50g Mini-Challenge: Number of positive divisors of x!
10-02-2017, 08:42 AM
Post: #21
 Joe Horn Senior Member Posts: 1,506 Joined: Dec 2013
RE: 50g Mini-Challenge: Number of positive divisors of x!
(10-02-2017 06:43 AM)Gerald H Wrote:
(10-02-2017 05:30 AM)Joe Horn Wrote:  I keep << -40 CF MEM DROP 0.5 WAIT TEVAL -40 SF >> assigned to a key for accurate timings.
Why do you have MEM in the programme? TEVAL does garbage collection.

Wow, so it does! I never knew that. Good to know. I've removed MEM DROP from my assignment. Thank you!

(10-02-2017 06:43 AM)Gerald H Wrote:  What's the point of 0.5 WAIT?

Short answer: Because I got annoyed having to tap the assigned key very rapidly, to prevent TEVAL's result from being polluted by the system slowdown caused by the keydown event.

Longer answer: Including 0.5 WAIT is only useful if TEVAL is executed via a key assignment. Try assigning just TEVAL by itself to a key, and you'll notice that you'll get the longest timings if you press and hold down the key during the entire TEVAL, and the fastest timings if you very rapidly tap the key (releasing the key before TEVAL even has a chance to begin), and various timings in between (when the key is released after TEVAL starts but before it finishes). Since my goal was reliably similar timings, I include 0.5 WAIT in the key assignment, which gives plenty of time for the key to be released before TEVAL begins to actually begin timing.

-40 CF turns off the "ticking" clock display, which causes a system interrupt once every second, which messes up timings. -40 SF is included because having the ticking clock display is the only known workaround for the Busy Bug.

<0|ɸ|0>
-Joe-
10-02-2017, 09:00 AM
Post: #22
 Gerald H Senior Member Posts: 1,414 Joined: May 2014
RE: 50g Mini-Challenge: Number of positive divisors of x!
Thank you, Joe, have modified my key assignment accordingly.
10-02-2017, 09:13 AM (This post was last modified: 10-02-2017 09:13 AM by pier4r.)
Post: #23
 pier4r Senior Member Posts: 2,016 Joined: Nov 2014
RE: 50g Mini-Challenge: Number of positive divisors of x!
(10-02-2017 05:30 AM)Joe Horn Wrote:  Note that you can determine such timings yourself using the 50g's TEVAL command.

Yes I know, but if someone else did already, the result is already computed. Thanks nevertheless for the input! (that lead Gerald to inform us that TEVAL activates the GC)

Wikis are great, Contribute :)
10-02-2017, 12:44 PM
Post: #24
 John Keith Senior Member Posts: 451 Joined: Dec 2013
RE: 50g Mini-Challenge: Number of positive divisors of x!
(10-01-2017 03:47 PM)pier4r Wrote:  John it seems that you have some knowledge of speed of some commands (considering also the other thread where you today wrote that CEIL is faster than 1 + IP ). By chance do you have some measurements in time for each command tested by you?

Well, I have been benchmarking HP calculator commands and functions since the HP-71B but everything is scribbled in various notebooks and folders. Turning my notes into machine-readable form would be a monumental task which is far from the top of my To-do list. :-)

Hopefully someone has posted this information before but I don't know where. If enough people are interested I would be happy to contribute some basic stats but a full spreadsheet or article would be beyond the time I have available for such things.

John
10-02-2017, 01:24 PM
Post: #25
 Gerald H Senior Member Posts: 1,414 Joined: May 2014
RE: 50g Mini-Challenge: Number of positive divisors of x!
There is this list

http://www.hpmuseum.org/cgi-sys/cgiwrap/...i?read=700

It may be best to start a new thread in General Forum.
10-04-2017, 03:40 PM
Post: #26
 Gerald H Senior Member Posts: 1,414 Joined: May 2014
RE: 50g Mini-Challenge: Number of positive divisors of x!
A more efficient version of the programme:

Size: 124.

CkSum: # 6E3Ch

Code:
::   CK1&Dispatch   # FF   ::     ZINT 1     SWAP     ZINT 0     BEGIN     FPTR2 ^Prime+     2DUP     Z>=     WHILE     ::       2DUP       ZINT 0       SWAPROT       BEGIN       OVER       FPTR2 ^ZQUOText       ROTOVER       FPTR2 ^RADDext       3UNROLL       FPTR2 ^DupQIsZero?       UNTIL       2DROP       ZINT 1       FPTR2 ^RADDext       4ROLL       FPTR2 ^RMULText       3UNROLL     ;     REPEAT     2DROP   ; ;
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)


text:
Archive for the ‘programming’ Category.

## Default (initial) value in Django's admin for a choice field

I was trying to set the initial value for a choice field in the admin like this:

from django import forms
from django.contrib import admin
from mptt.admin import MPTTModelAdmin
from author.models import Author
from serials.constants import STATUS_CHOICES

class AuthorAdminForm(forms.ModelForm):
class Meta:
model = Author

class AuthorAdmin(MPTTModelAdmin):
form = AuthorAdminForm(initial={'status': STATUS_CHOICES[0][0]})
admin.site.register(Author, AuthorAdmin)

Logically, I should have been able to do it this way, I thought, at least according to the docs. But instead it was giving me this error: TypeError: issubclass() arg 1 must be a class. (Uh, ok.) After a bit of searching, I eventually found this comment, and realized I must be trying to instantiate a form that the admin would instantiate automatically, had already been instantiated, or something like that pharmacieviagra.com.

After some more searching, I found the answer on the way to do what I needed here:

from django import forms
from django.contrib import admin
from mptt.admin import MPTTModelAdmin
from author.models import Author
from serials.constants import STATUS_CHOICES

class AuthorAdminForm(forms.ModelForm):
class Meta:
model = Author

def __init__(self, *args, **kwargs):
super(AuthorAdminForm, self).__init__(*args, **kwargs)
self.initial['status'] = STATUS_CHOICES[0][0]

class AuthorAdmin(MPTTModelAdmin):
form = AuthorAdminForm
admin.site.register(Author, AuthorAdmin)

Yay! Hope this helps someone else who has the same issue. :)

## Django trick: using named admin urls in templates

To add a link to an admin page on the user-side of your django site, you can use the named url patterns. (Seems like a simple and fairly straightforward thing to want to do, but I frequently find that things are not so simply found in most open source docs, nor are the examples always useful. But my usual open source docs rant is for another day. *g*)

It took a bit of digging, but I finally found that the admin url pattern options are listed here. From that, I was able to figure out that if I wanted to link to the edit (change action) page (parameter) for an article (model) in the app article, the pattern was:

{{ app_label }}_{{ model_name }}_action [parameters]

The namespace for the admin is, of course, admin, so putting that together using the {% url %} template tag, you get:

{% trans 'Edit' %}

That correctly creates the relative url to /admin/article/article/2. Yay!

Be sure to load the admin template tags in your template, too, or it won't work:

{% load admin_urls %}

Et voilà! *vbg* Hope this saves someone else a bit of time.

(This works for Django 1.4, btw.)

## Htaccess trick

Here's what I ended up putting in an .htaccess file for each of the various sites I run/own/manage to participate in the SOPA/PIPA protest today:

RewriteEngine On RewriteCond %{TIME_HOUR}%{TIME_MIN} >0459 RewriteCond %{TIME_HOUR}%{TIME_MIN} <1701 RewriteCond %{TIME_YEAR}%{TIME_MON}%{TIME_DAY} =20120118 RewriteRule ^(.*)\$ http://sopastrike.com/strike/ [R=307,NC,L]

Learn something new every day. *g*

This forwarded each site to the protest page for a certain time frame (the length of the protest, adjusted for the server's time). You could use something like that to put a site in maintenance mode, for example. Just be sure to add a RewriteCond that checks for your IP so you can get to the site to test it. ;)

## Django, MySQL, and Windows 7 64-bit installation tips

Here are the solutions to a few annoying things that caused issues when I was installing Python, Django, and MySQL on a new Windows 7 64-bit laptop.

1. Be sure to set your PYTHONPATH variable.

After I installed ActiveState Python, it didn't set up the environmental variable. I added it and restarted the command window, and voilà. (I don't remember having to set that up manually on my XP machine, but I could be mistaken since it's been a very long time since I installed everything on that machine. Regardless, it's a good thing to check. *g* Also check your PATH variable, to make sure that Python, Django, and MySQL are all in there.)

2. Assign the read_default_file setting in the database dictionary.

I was getting "Error 2003: Can't connect to MySQL server on 'localhost' (10061)." It wasn't the firewall blocking the port, because mysql is running on a socket. (Though I could be wrong, as I just switched over to Codomo from ZoneAlarm, which had issues with Win7 64-bit and Filezilla, and I haven't learned all of Codomo's quirks yet, so who knows?) Even though I've got the admin service set up to execute "C:\progs\mysql\bin\mysqld" --defaults-file="C:\progs\mysql\my.ini" MySQL, it still wasn't finding the ini file for some reason. Weirdly, telling Django which my.ini file to run MySQL with fixed it. In your settings.py, in the database section, you'll add the OPTIONS entry:

 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'database_name', 'USER': 'username', 'PASSWORD': 'password', 'HOST': '', 'PORT': '', 'OPTIONS': { 'read_default_file': 'c:\path\to\your\my.ini', }, } }

## Another simple but useful Django trick

Say you need the full URL of the current page you're displaying that you need to use on the template of that page, for example, to add links to Facebook, Delicious, etc., and you don't want to have additional JavaScript that you didn't write on your pages. (Why yes, I'm a control freak, shush. :P) Also say that you don't want to use the sites framework to hack it together. The permalink decorator won't work, either, because that just gives you the relative link.

Thankfully, there's a new request object that's been added to 1.0 that will do it.

To use it, include the bolded bit in your views.py file, as part of each view where you want to have the variable available:

return render_to_response('dir/template.html', {'object': obj, 'link': request.build_absolute_uri()}, RequestContext(request))

Then you can use the link variable on the template where you need the URL:

I have yet to figure out how to get it to work with generic views, so feel free to holler if you know how. *vbg*


text:
1
JEE Main 2022 (Online) 25th July Morning Shift
Numerical
+4
-1

\begin{aligned} &\text { If } \lim _{n \rightarrow \infty} \frac{(n+1)^{k-1}}{n^{k+1}}[(n k+1)+(n k+2)+\ldots+(n k+n)] \\ &=33 \cdot \lim _{n \rightarrow \infty} \frac{1}{n^{k+1}} \cdot\left[1^{k}+2^{k}+3^{k}+\ldots+n^{k}\right] \end{aligned}, then the integral value of $$\mathrm{k}$$ is equal to _____________

2
JEE Main 2022 (Online) 30th June Morning Shift
Numerical
+4
-1

If for some $$\alpha$$ > 0, the area of the region $$\{ (x,y):|x + \alpha | \le y \le 2 - |x|\}$$ is equal to $${3 \over 2}$$, then the area of the region $$\{ (x,y):0 \le y \le x + 2\alpha ,\,|x| \le 1\}$$ is equal to ____________.

3
JEE Main 2022 (Online) 30th June Morning Shift
Numerical
+4
-1

Let $$f(t) = \int\limits_0^t {{e^{{x^3}}}\left( {{{{x^8}} \over {{{({x^6} + 2{x^3} + 2)}^2}}}} \right)dx}$$. If $$f(1) + f'(1) = \alpha e - {1 \over 6}$$, then the value of 150$$\alpha$$ is equal to ___________.

4
JEE Main 2022 (Online) 29th June Evening Shift
Numerical
+4
-1

For real numbers a, b (a > b > 0), let

Area $$\left\{ {(x,y):{x^2} + {y^2} \le {a^2}\,and\,{{{x^2}} \over {{a^2}}} + {{{y^2}} \over {{b^2}}} \ge 1} \right\} = 30\pi$$

and

Area $$\left\{ {(x,y):{x^2} + {y^2} \le {b^2}\,and\,{{{x^2}} \over {{a^2}}} + {{{y^2}} \over {{b^2}}} \le 1} \right\} = 18\pi$$

Then, the value of (a $$-$$ b)2 is equal to ___________.

JEE Main Subjects
Physics
Mechanics
Electricity
Optics
Modern Physics
Chemistry
Physical Chemistry
Inorganic Chemistry
Organic Chemistry
Mathematics
Algebra
Trigonometry
Coordinate Geometry
Calculus
EXAM MAP
Joint Entrance Examination


text:
QuSpin: a Python Package for Dynamics and Exact Diagonalisation of Quantum Many Body Systems. Part II: bosons, fermions and higher spins

Submission summary

 As Contributors: Marin Bukov · Phillip Weinberg Arxiv Link: https://arxiv.org/abs/1804.06782v1 (pdf) Date submitted: 2018-05-14 02:00 Submitted by: Weinberg, Phillip Submitted to: SciPost Physics Academic field: Physics Specialties: Atomic, Molecular and Optical Physics - Experiment Atomic, Molecular and Optical Physics - Theory Condensed Matter Physics - Theory Quantum Physics Approach: Computational

Abstract

We present a major update to QuSpin, SciPostPhys.2.1.003 -- an open-source Python package for exact diagonalization and quantum dynamics of arbitrary boson, fermion and spin many-body systems, supporting the use of various (user-defined) symmetries in one and higher dimension and (imaginary) time evolution following a user-specified driving protocol. We explain how to use the new features of QuSpin using seven detailed examples of various complexity: (i) the transverse-field Ising model and the Jordan-Wigner transformation, (ii) free particle systems: the SSH model, (iii) the many-body localized Fermi-Hubbard model, (iv) the Bose-Hubbard model in a ladder geometry, (v) nonlinear (imaginary) time evolution and the Gross-Pitaevskii equation, (vi) integrability breaking and thermalizing dynamics in the translationally-invariant 2D transverse-field Ising model, and (vii) out-of-equilibrium Bose-Fermi mixtures. This easily accessible and user-friendly package can serve various purposes, including educational and cutting-edge experimental and theoretical research. The complete package documentation is available under: http://weinbe58.github.io/QuSpin/index.html

Ontology / Topics

See full Ontology or Topics database.

Current status:
Has been resubmitted

Submission & Refereeing History

Published as SciPost Phys. 7, 020 (2019)

Resubmission 1804.06782v2 on 3 July 2019

Submission 1804.06782v1 on 14 May 2018

Reports on this Submission

Anonymous Report 2 on 2018-6-12 (Invited Report)

• Cite as: Anonymous, Report on arXiv:1804.06782v1, delivered 2018-06-12, doi: 10.21468/SciPost.Report.496

Strengths

1. Very useful package for a broad community
2. Powerful new features: support for fermionic, bosonic, and higher spin systems, computation of entanglement entropies and spectra, the possibility to introduce user-defined symmetries, parameter-dependent Hamiltonians, and more
3. Very useful tutorials with interesting practical examples
4. Open-source! The authors encourage the community to get involved in the project.

Weaknesses

1. The parallel capabilities of the package are not so clear

Report

In this paper the authors present an updated version of their open-source Python package called QuSpin for exact diagonalization and quantum dynamics for quantum lattice models. They explain their package in great detail based on different interesting examples in a tutorial-style way.

As already the previous version of the package, I find this project a great initiative which I believe is very useful for a broad community, ranging from undergraduate students to senior theory and experimental researchers. With this major update the authors have substantially increased the range of applicability of their package, making a new release absolutely justified.

For these reasons I can recommend publication of this article in its present form (up to minor details, see suggested changes).

Requested changes

Suggested changes:
1. The only point of improvement I see is to better comment on the parallel capabilities of the package which is not very clear from the text (there is only one remark on p22, and a few remarks on p 40 with reference to the Documentation C). It would be interesting to have a quick overview somewhere, to what extend the package can be used in parallel computations. (If certain parts do not support parallelism yet, that could be mentioned as possible feature in a future release).
2. a few typos and minor points:
- p.8 title of Sec 2.2: write out SSH -> Su-Schrieffer-Heeger
- Figure 4 caption rhs: (b) local -> (b) Local
- Fig.5: figure labels are borderline small
- p27, after code line 41: Hsmiltonian -> Hamiltonian

• validity: top
• significance: high
• originality: good
• clarity: high
• formatting: excellent
• grammar: excellent

Report 1 by Seyed Nariman Saadatmand on 2018-6-12 (Invited Report)

• Cite as: Seyed Nariman Saadatmand, Report on arXiv:1804.06782v1, delivered 2018-06-12, doi: 10.21468/SciPost.Report.472

Strengths

1- QuSpin is well-documented and relatively easy to install; while, existing or new scripts for a desired physical model can be managed and executed conveniently.
2- Supporting arbitrary integer and half-integer spin, fermionic, bosonic, and mixed-species models.
3- Providing basis constructors that support a large class of physical symmetries, which allow users to run jobs with built-in Hamiltonian symmetries. In addition, for dynamical calculations, QuSpin can split the evolution over relevant symmetry sectors (i.e. project out a non-symmetric initial wavefunction into different symmetry sectors and, then, evolve each sector separately).
4- The ability to study free-particle translation-invariant Hamiltonians in real-space using single-particle states, in oppose to employing a Fock-space basis. This would allow users to significantly scale up system size due to the absence of the exponential scaling of the Hilbert space dimension for non-interacting models.
5- The ability to construct a (generator) list containing the operators in a series of requested times or the corresponding time-evolved states.
6- The ability to solve user-defined equations of motion (in practice, a series of ODEs).
7- Supporting tensor-product bases, which allows users to construct product states more easily.
8- Although QuSpin is nominally a Python package, its matrix computations are written in and done through Cython, which is a tool that compiles Python syntax to highly-efficient C/C++ routines, making the execution orders of magnitude faster than pure Python codes.

Weaknesses

1- In operator lists/strings, $S^x$ and $S^y$ operators are only available for spin-1/2 systems (corresponding to Pauli $\sigma^x$ and $\sigma^y$ operators).
2- Although the paper presents a large number of tutorials covering interesting physical models, it lacks an example discussing the construction of a geometrically frustrated spin Hamiltonian, such as Heisenberg-type models on honeycomb, Kagome, or triangular lattice. The mapping from the ''snake-like folded'' chain, parametrized by $s$, to the 2D lattice is slightly less trivial than the square-lattice model of the example in Sec. 2.6, and the emergent physics is rather more interesting and, also, more difficult for other numerical methods to tackle.
3- The following is only a potential weakness for the QuSpin core codes and not essentially relates the manuscript: during the execution of Python jobs, I wish there was more informative messages/warnings printed to stdout by default, especially while performing the actual diagonalization calculations (activating '-v' options of Python, will not help as it prints too many messages, mostly useless for getting information on the physically-important numerics).

Report

In this paper, the authors present the new features and several interesting tutorials for their open-source Python package, QuSpin [http://weinbe58.github.io/QuSpin/index.html]. After the recent major updates, QuSpin can be now considered as a comprehensive and well-optimized numerical toolkit to tackle the exact diagonalization (ED) and (imaginary) time-evolution calculations for quantum many-body systems. It is worth mentioning that performing such static and dynamical ED calculations are still relevant today (e.g. see the reasons discussed in the Requested Changes part of this report). The basic documentation and a series of rather less-complicated physical examples were presented in the package's first paper, [SciPost Phys. 2, 003 (2017)].

The new version of QuSpin features several important improvements, which I listed, in details, in the Strengths part of this report. In particular, the attention of authors to provide this many physically useful tools is admirable. However, it is important to note that most of these new features cannot be counted as major upgrades when we consider the physics of the targeted problems and the ED method itself, and certainly not worthy of a separate publication. Such updates are, of course, expected improvements for an evolving numerical package, the developers of which can be held accountable to make it more comprehensive and cost-efficient with the passage of time (see also below for a suggestion for listing the "updates" differently). On the other hands, the included step-by-step tutorials of physical models, although having significant pedagogical importance, and some are rather complicated to program and simulate from scratch but contain no new physics. Nevertheless, among the new features, I believe there are two truly major upgrades giving the paper the required originality: these are, of course, the addition of bases for higher than $S=\frac{1}{2}$ spins, fermions, and bosons, and providing the physical-basis support for a wide range of Hamiltonian symmetries. The aforesaid features are rarely available in other numerical toolkits (considering highly-efficient packages of all available modern numerical methods not only ED) and certainly require high efforts in programming and understanding the underlying physics.

As discussed, the new features of packages are introduced, in good details, through seven well-structured examples studying physical models, some of which are also being actively investigated on the frontier of modern physics. In the first example, the authors find the spectrum of the integrable transverse-field spin-$1/2$ ferromagnetic Ising chain using both the spins' computational basis and the
Jordan-Wigner transformation to switch to an interaction-free spinless fermionic Hamiltonian. I believe this example mainly teaches users how to construct spin and fermionic Hamiltonians, implement the boundary conditions, and avoid some common mistakes in doing so, and exploit spin inversion and reflection symmetries. In the next example, the characterizing gap in the spectrum and a non-equal-time correlator of the Su-Schrieffer-Heeger model are calculated. This example mainly teaches users how to construct free-particle translation-invariant Hamiltonians and time-evolve multiple quantum states simultaneously. In the third example, the authors study a dynamical phase transition (from a many-body-localised to an ergodic state) in the Fermi-Hubbard model with a random disorder. This example mainly teaches users how to construct Fock states and measure observables as a function of time efficiently. In the next example, the thermalization of an initial state of the non-integrable Bose-Hubbard model (placed on a short cylinder) is demonstrated through the study of entanglement entropy and local density of bosons. This example mainly teaches users how to construct a bosonic Hamiltonian on a ladder and to evolve a state over different symmetry sectors. In the fifth example, the authors (imaginary) time-evolve some states using Gross-Pitaevskii wave equations. This example mainly teaches users how to define time-dependent nonlinear equations of motion and try to solve such ODEs. In the next example, the dynamics of one-dimensional and square-lattice transverse-field Ising models are compared (mainly by studying some normalised relative energies) to show the non-integrability of the latter. This example mainly teaches users how to construct and define symmetries for the 2D systems. In their final tutorial, the authors study the dynamics of the entanglement entropy for a single species of the spinless Bose-Fermi mixture Hamiltonian. This tutorial mainly teaches users how to use tensor-product basis class and periodically time-evolve a state. In the end, it is worth mentioning that I was able to run all the provided example codes successfully.

Therefore, upon applying corrections in accordance with the required changes below, I strongly recommend the publication of this manuscript.

Requested changes

The following changes are required:

1- In Fig. 2(a), it is necessary to state (in the figure or the text) that the energies are in the unit of $J$.
2- In Page 9, the first paragraph, the original SSH papers [Phys. Rev. Lett. 42 1698-701 1979, Phys. Rev. B 22 2099-111 1980, Phys. Rev. B 28 1138(E) 1983], highlighting the history of the model and the relevance to polyacetylene, must be cited. It is suggested to also reference a modern take on the model to highlight the concept of emergent topological edge states.
3- It is not clear which numerical routines exp_op class uses to estimate the matrix exponentials. If this class also employs Python's expm function, as used in other places in the paper, the authors need to state this more clearly. If exp_op class exploit other numerical methods, the authors need to mention accordingly and add appropriate references.
4- In Page 2, the second paragraph, the authors correctly discuss that ED methods are still relevant to study certain dynamical problems. Another common and important use for ED calculations, in competition with highly-precise tensor network methods, is to derive the full or low-lying spectrum of frustrated Hamiltonians even on small system sizes. One needs to keep in mind that while employing tensor network approaches, although capable of studying very large system sizes, one requires to run a separate simulation to find the ground state and each individual excited state separately. I believe this other practical use of ED should be added to this paragraph.
5- In Pages 20 and 21, the discussed coefficients relate to Code Snippet 1, and not to Fig. 1 as stated in the text.
6- In Page 24, the sixth paragraph, the addition of at least one (original or review) reference covering Gross-Pitaevskii wave equations is necessary. Also, I like to suggest to put another reference covering the use of Gross-Pitaevskii equations, specifically, in nonlinear optics.

The following minor changes are suggested:

1- In Abstract, the authors appropriately specify the dimensions and/or lattice geometries of models in examples (iv) and (vi). The same can be also done for the models in other examples (e.g. using "Ising chain" instead of "Ising model"); especially, since mentioning the dimensionalities/geometries will reflect the degree of their complexity.
2- In Abstract, the SSH abbreviation is used for the first time here without stating the full version. Nevertheless, I suggest avoiding the use of the short form of the model name in the abstract.
4- In Page 3, the first paragraph, it is more appropriate to separate New Features into two groups as "major changes" and "other added features" (or any similar titles), as discussed in my Report, to highlight the importance of significant new changes marked as (i) and (ii).
5- The following is only a suggested change for the QuSpin core codes and not essentially relates the manuscript: as mentioned, the installation of the package is well-explained and rather straightforward by following the available guides and through the Python package manager Anaconda. However, the authors fail to address a seemingly common problem that I have faced during installation of QuSpin on several machines, i.e. the 'Permission denied' error while performing 'conda install -c weinbe58 quspin' (which perform several transactions at once). This would happen for any user with not enough permission in /address_to_anaconda directory and often cannot be fixed by changing umask settings (in addition, it is not recommended and useful to run anaconda with sudo). The solution is, of course, to simply run 'sudo chown user:user anaconda-dir/ -R' on all or relevant Anaconda directories.
6- There are no mentions of the available and important feature of Lanczos subspace diagonalization until the example in Sec. 2.5. It is suggested for this feature to be briefly discussed in the introduction.
7- The abbreviation GS, standing for the ground state, is first used in Page 27 without stating the full version. Nevertheless, I suggest avoiding the use of GS at any place.
8- Since the provided guideline for how to run Python codes is so brief (basically a one-liner as 'python test.py'), Appendix B seems very unnecessary. This one line can be then added to Appendix A.
9- Often when the authors discuss the spin-1/2 transverse-field Ising model on a chain (one-dimensional) or in two dimensions, they do not clearly state which models they really mean, e.g. see the last paragraph of Page 30. I encourage the authors to pay more attention to specifying the dimensionality of the Ising model.
10- In Sec. 2.6, it is never explicitly mentioned that the Ising model of the interest is on a square lattice. It would be useful to add this information to the beginning of the section.
11- The abbreviation DM, standing for the density matrix, is first used in Page 40 without stating the full version. Nevertheless, I suggest avoiding the use of DM at any place.

• validity: high
• significance: good
• originality: ok
• clarity: high
• formatting: good
• grammar: excellent


text:
Electronic – Inverting OpAmp with voltage divider in feedback loop

amplifierfeedbackfilteroperational-amplifier

Last week I was looking for a programmable gain amplifier (PGA) with high gains (> 100V/V) and low noise. As far as I know most of the PGA integrated circuits out there are just (inverting) amplifier stages with the option to digitally switch feedback resistors. Please take a look at the block diagram of the LTC6912 for example:

In my opinion one of the problems you'll face when trying to minimize noise in a high gain standard (inverting) amplifier configuration, is the size of the feedback resitor. The high gain forces the resistor to get big, which results into a lot of noise.

So I started looking for other configurations where the feedback resistor doesn't have to be this big.

I found a very interesting article: https://www.electronicdesign.com/analog/digitally-programmable-amplifier-meets-sensor-gain-ranging-needs

In this article a PGA is built upon a sort of inverting amplifier configuration with a voltage divider in the feedback loop. Because I can't find anymore information about his type of circuit I started analyzing it myself and found the gain formula as follows:

The simulation result below shows the circuit with a large gain of 65.7dB with feedback resistors of only 39k. This seems very useful to me, however I've never seen it before…

When I started reading further, I found that the author used the same opamp configuration as a band pass filter, shown in the picture below.

Because I'm very excited about this topology I'm trying to find formulas for the cut-off frequencies of this circuit. However I really don't know how to do it. Is there anyone who can help me out? More information about these circuits is welcome as well! Thanks

To find the lower cutoff frequency and passband gain, you can use Miller's theorem to separate the $$\100nF\$$ into two capacitances to ground.

simulate this circuit – Schematic created using CircuitLab

The schematic contains a simulation that shows you the similarity.

I determined $$\A_{DC} \approx -16\ 443\$$, resulting in an input capacitance of $$\C_{in} = C\cdot (1-A_{DC}) \approx 1.6mF\$$ and an output capacitance of $$\C_{out} = C\cdot \left(1 - \frac{1}{A_{DC}}\right) \approx 100nF\$$.

Doing so will allow you to calculate the lower cutoff frequency and passband gain.

$$A_{in\to B,miller} = \frac{R_8C_6s}{1+R_8(C_6+C_9)s}$$

There is a zero at f=0Hz, and a first cutoff frequency at

$$f_{p1} = \frac{1}{2\pi R_8(C_6+C_9)} \approx 0.1Hz$$

The passband gain is severely reduced by the capacitive divider circuit.

$$A_{pb} = A_{DC}\cdot\frac{C_6}{C_6+C_9} \approx 5.75 = 15.2dB$$

At high frequencies, the opamp can't produce high gains and the approximation breaks down. The higher cutoff frequency will be determined by the GBW of the opamp. If the opamp is considered ideal, then this is a high-pass filter.